[R] decision values and probability in SVM

Das, Rajdeep das at cshl.edu
Thu Mar 17 00:55:34 CET 2005


Hi,
 
I am using SVM from e1071 package.  I can get decision values very easily. But whenever, I try to get the probability measure, it returns NULL. I use the following codes to generate decision.values and probability. Is there anything wrong in it?
 
 
predictor<-svm(train[,c(x1, x2, x3)], train[,x4], probability=TRUE)
 
pred<-predict(predictor, test[,c(x1, x2, x3)], probability=TRUE, decision.values=TRUE)
 
attr(pred, "decision.values")[1,]
 
attr(pred, "probabilities")[1,]
 
 
Thanks for your help.
 
Raj




More information about the R-help mailing list