Hi, 

I used the e1071 package. I am getting a little confused about the output. After training my svm model, I used predict(SVMmodel,testdata) to predict some unknown samples. However, I am not clear whether the output is the posterior probability of belonging to one class or just like some absolute values, which is defined as one class when it's smaller than 0, the other class when it's larger than 0. I did two cases:
1. Use the trained model to predict the samples which are used to train the model. since it's a easy-to-separate case,  predict( SVM, t(A_train) ) yields values between (0,1), and I think this is the posterior probability of belonging to one class.
2. Use some random generated data, 
A_train = matrix(rnorm(5000),ncol = 10)
A_test = matrix(rnorm(20000),ncol = 40)+200
Label_train = c(rep(0,5),rep(1,5))
SVM = svm( t(A_train), Label_train, scale=F, kernel="linear")
predict(SVM,t(A_test))
gives all negative numbers (about -13). This makes me feel that it's not the probability, could anyone give me some suggestions on this? 

Thanks,

James



       
---------------------------------

	[[alternative HTML version deleted]]

