
Hi steve,
Thank you so much for your reply.I’m asking about the difference between two cases:1) when I use svm in a regression system and 2) when I use svm in a classification system. Is the code of using svm in these two cases the same?This is the code for a regression system:
my_svm_model <- function(myformula, mydata, mytestdata) 
            {
      mymodel <- svm(myformula, data=mydata)       
            mytest <- predict(mymodel, mytestdata)
            error <- mytest - mytestdata[,1]
            -sqrt(mean(error**2))
            }Many thanks,
Nancy
> Date: Tue, 29 Dec 2009 10:36:36 -0500
> Subject: Re: [R] svm regression/classification
> From: mailinglist.honeypot@gmail.com
> To: nancyadam84@hotmail.com
> CC: r-help@r-project.org
> 
> Hi Nancy,
> 
> Comments in line:
> 
> On Sun, Dec 27, 2009 at 3:34 AM, Nancy Adam <nancyadam84@hotmail.com> wrote:
> 
> > 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?:
> 
> I'm not sure how to answer your question ... are you asking how you
> can explicitly tell the `svm` function to do classification vs.
> regression? Or are you asking if classification is better suited for
> your problem than regression?
> 
> Are you trying to predict a label or some range of "real valued"
> numbers? Can you show us your `y` vector?
> 
> -steve
> 
> -- 
> Steve Lianoglou
> Graduate Student: Computational Systems Biology
> | Memorial Sloan-Kettering Cancer Center
> | Weill Medical College of Cornell University
> Contact Info: http://cbio.mskcc.org/~lianos/contact
 		 	   		  
_________________________________________________________________
Keep your friends updated—even when you’re not signed in.

	[[alternative HTML version deleted]]


