[R] can not print probabilities in svm of e1071

2010-04-29 Thread Changbin Du
x - train[,c( 2:18, 20:21, 24, 27:31)] y - train$out svm.pr - svm(x, y, probability = TRUE, method=C-classification, kernel=radial, cost=bestc, gamma=bestg, cross=10) pred - predict(svm.pr, valid[,c( 2:18, 20:21, 24, 27:31)], decision.values = TRUE, probability = TRUE) attr(pred,

Re: [R] can not print probabilities in svm of e1071

2010-04-29 Thread Saeed Abu Nimeh
svm.model - svm(y~.,data=dataset,probability=TRUE) svm.pred-predict(svm.model, test.set, decision.values = TRUE, probability = TRUE) library(ROCR) svm.roc - prediction(attributes(svm.pred)$decision.values, test.set) svm.auc - performance(svm.roc, 'tpr', 'fpr') plot(svm.auc) On Thu, Apr 29,

Re: [R] can not print probabilities in svm of e1071

2010-04-29 Thread Changbin Du
HI, Saeed, Thanks so much for the help, I run your code and found the following problem, do you have any comments or suggestions? svm.p-svm(as.factor(out) ~ ., data=train[,c( 2:18, 20:21, 24, 27:32)], probability=TRUE, method=C-classification, + kernel=radial, cost=bestc, gamma=bestg, cross=10)

Re: [R] can not print probabilities in svm of e1071

2010-04-29 Thread Changbin Du
HI, Saeed, It worked this time. Thanks, I appreciated it very much! On Thu, Apr 29, 2010 at 5:23 PM, Saeed Abu Nimeh sabun...@gmail.com wrote: in svm.roc - prediction(attributes(svm.pred)$decision.values, valid) valid should be the output variable in the validation set. maybe valid[,1]