Hi R users,

 

I'm trying to run a SVM - regression using e1071 package but the function svm() all the time apply a classification method rather than a regression.

 

svm.m1 <- svm(st ~ ., data = train, cost = 1000, gamma = 1e-03)  

 

Parameters:

   SVM-Type:  C-classification 

 SVM-Kernel:  radial 

       cost:  1000 

      gamma:  0.001 

 

Number of Support Vectors:  209

 

 When I specify the method ="eps-regression" is the same  

 

svm.m1 <- svm(st ~ ., data = train, method="eps-regression", cost = 1000, gamma = 1e-03)  

 

Call:

svm(formula = st ~ ., data = train, method = "eps-regression", cost = 1000, 

    gamma = 0.001)

 

Parameters:

   SVM-Type:  C-classification 

 SVM-Kernel:  radial 

       cost:  1000 

      gamma:  0.001 

 

Number of Support Vectors:  209

 

I know that it is wrong because when I do prediction appear levels.

 

I'm working with normalized data [0,1] (249 points) . I don't have idea what it is wrong. 

 

Somebody can help me? 

 

h_aspire

 

dados=read.table("svmdata.txt",header=TRUE)

index=1:nrow(d)

test=d[210:249,]  

train=d[1:209,]

require(e1071)

tuneobj = tune.svm(st ~ ., data = train, gamma = 10^(-6:-3), cost = 10^(1:3summary(tuneobj)

svm.m1 <- svm(st ~ ., data = train, cost = 1000, gamma = 1e-03)  

svm.pred <- predict(svm.m1, test)

	[[alternative HTML version deleted]]


