r - What can I do about svmpath needing so much memory in one gulp? -
r - What can I do about svmpath needing so much memory in one gulp? -
i trying out svmpath
package, supposed find optimal hyperparameters trained svm without requiring multiple runs on different subsets of data. more importantly, it's supposed less computationally complex (according docs).
however, seems inquire lot of memory @ once.
minimal working example:
library(data.table) library(svmpath) # loaded svmpath 0.953 features <- data.table(matrix(runif(100000*16),ncol=16)) labels <- (runif(100000) > 0.7) svmpath(x=features,y=labels) # error in x %*% t(y) : requires numeric/complex matrix/vector arguments svmpath(x=as.matrix(features),y=labels) # error: cannot allocate vector of size 74.5 gb library(kernlab) ksvm(as.matrix(features),y=labels,kernel=vanilla) # runs
inspecting training function shows 1 line pops out perchance big, kscript <- k * outer(y, y)
. indeed seems culprit: runif(100000) %o% runif(100000)
produces same error.
are there quick fixes easy implement in r?
r svm
Comments
Post a Comment