[R] svm regression

Uwe Ligges ligges at statistik.tu-dortmund.de
Thu Feb 18 20:10:00 CET 2010



On 18.02.2010 17:54, madhu sankar wrote:
> Hi,
>
> I am trying to use svm  for regression data.
>
> this is how my data looks like:
>
>> dataTrain
>
> x  y   z
> 1  4  6
> 2  5  4
> 3  7  5
>
>> classTrain
>
> a
> 2
> 3
> 4
>
>> dataTest
>
> x y  z
> 1 7  2
> 2 8  3
>
>> classTest
>
> a
> 3
> 4
> 5
>
>
> building the model
>
> model<-svm(dataTrain,classTrain,type="nu-regression")
> pred<- predict(model, dataTest)
>
>> pred
>         1        2
> 3.008842 3.120078
>
> I don't understand what the above value means.i need the results similar to
> classTest.


They are similar, aren't they?
You talk about svm *regression* rather than classification and call your 
object "class....." which makes me worry you failed to understand some 
basics of the method.

Uwe Ligges



>
> Thanks,
> Joji.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list