
 
 
Hi everyone,
 
Can anyone please tell whether there is a difference between the code for using svm in regression and code for using svm in classification?
 
This is my code for regression, should I change it to do classification?:
 
train <- read.table("trainingset.txt",sep=";")
test <- read.table("testset.txt",sep=";")
 
 
svmmodelfitness <- function(myformula,mydata,mytestdata) 
{
                   
     mymodel <- svm(myformula,data=mydata) 
 
      mytest <- predict(mymodel, mytestdata)
      error <- mytest - mytestdata[,1]
      -sqrt(mean(error**2))
}
 
Many thanks,
Nancy 		 	   		  
_________________________________________________________________


	[[alternative HTML version deleted]]


