[R] svm: is this right?

From: Weiwei Shi <helprhelp_at_gmail.com>
Date: Tue, 12 Feb 2008 13:43:18 +0800


Hi,
I have a question on using svm{e1071} for a classification task:

No matter how I split the data into training and test, I always end with a perfect accuracy in training but sensitivity = 0 for test. One example is like this

      1 2
  1 209 0
  2 0 67

   pred1
     1 2
  1 47 0
  2 17 0

My question is, is there anything wrong with the following call: m2 <- best.svm(class~., data=x1, gamma=2^(-3:3), cost=2^(0:5)) # x1 is training data
pred1 <- predict(m2, x3) # x3 is test data

Thanks!

-- 

Weiwei Shi, Ph.D
Research Scientist
GeneGO, Inc.


"Did you always know?"
"No, I did not. But I believed..."
---Matrix III [[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.
Received on Tue 12 Feb 2008 - 05:50:02 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 12 Feb 2008 - 06:30:13 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive