Displaying 1 result from an estimated 1 matches for "svmmodelfit".
2009 Dec 27
1
svm regression/classification
...een 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
__________________________...