[R] Comparison between Train and SVM method

Neeti nikkihathi at gmail.com
Tue Feb 8 12:33:28 CET 2011



Hi all,

I am struggling to understand kernel based method. I am trying to understand
two SVM method (CARET::train and e1071::svm())  I will try to put my
question in following points:

1.	About e1071::svm(), on what basis the final model is selected when we use
cross =10 parameter in svm()? Is it based on accuracy? How to retrieve the
final model? I understand that CARET::train method select the final model
based on best accuracy but fail to understand e1071::svm() method.
 
2.	I understand that e1071::SVM() scale the data with Mean0Stdev1 Scaling
method (please correct me if I am wrong). Which is the method used in
CARET::train scale the data? 

3.	Following is the code I am using to select model to compair train() and
svm();

CARET::train

fit1<-train(train1,as.factor(trainset[,ncol(trainset)]),"svmpoly",trControl
= trainControl((method = "cv"),10,verboseIter = F),tuneLength=3)

tune_best<-fit1$bestTune;
degree1<-tune_best[[2]]
c1<-tune_best[[1]]

e1071::svm()
model_true1 <- svm(train1,species,kernel="polynomial",degree = degree1,cost
= c1,scale=T)

degree and c1 is the values that has been taken form train method() and used
in svm();(sorry if this part is not clear)

Now the question is, am I correct to say that both should give me
approximately similar result (or model)? As this code suggests that I am
using similar parameters and in principle I am using same kernel method.  
Should I compare both the result? 


-- 
View this message in context: http://r.789695.n4.nabble.com/Comparison-between-Train-and-SVM-method-tp3275780p3275780.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list