-
Notifications
You must be signed in to change notification settings - Fork 12
Description
I followed Rgtsvm-vignette.pdf and to test the function svm(), and sometimes they didn't work.
The following is not working correctly::: It also happens when I try the example ( model <- svm(Species ~ ., data = iris) )
model.gpu=svm(x[i.training,],y[i.training],type="C-classification")
Error in if (class(x) == "data.frame") x <- as.matrix(x) :
the condition has length > 1
此外: Warning message:
In !sparse && (class(x) %in% c("matrix", "data.frame")) :
'length(x) = 2 > 1' in coercion to 'logical(1)'
The following is working correctly:::
gt.svm=svm( dat[i.train,-c(1,2)],dat[i.train,1],gamma=as.numeric(0.0625),cost=as.numeric(10,sacle=F))
show(gt.svm)
Call:
svm.default(x = dat[i.train, -c(1, 2)], y = dat[i.train, 1], gamma = as.numeric(0.0625),
cost = as.numeric(10, sacle = F))
Parameters:
SVM-Type: C-classification
SVM-Kernel: radial
cost: 10
gamma: 0.0625
tolerance: 0.001
time elapsed: 48.922
Number of Support Vectors: 22093
This problem needs to be solved because I seem to get stuck in Rgtsvm when using dREG.