1
$\begingroup$

Could anyone help me to interpret these results from R? How can I find nBSV,nSv, obj and iteration numbers? How can I use nBSV and nSv, obj to determine which kernel is the best?

 <!-- language: lang-r>

> library(e1071)
> data(cats, package="MASS")
> inputData <- data.frame(cats[, c (2,3)], response as.factor(cats$Sex))
> svmfit <- svm(cross=10,response ~ ., data = inputData, kernel = "linear", 
                cost = 10, scale = FALSE) 
> print(svmfit)
Call:
svm(formula = response ~ ., data = inputData, cross = 10, kernel = "linear", 
    cost = 10, scale = FALSE)


Parameters:
   SVM-Type:  C-classification 
   SVM-Kernel:  linear 
   cost:  10 
   gamma:  0.5 

Number of Support Vectors:  79
> plot(svmfit, inputData)

output of plot(svmfit, inputData)

$\endgroup$
2
  • 1
    $\begingroup$ For whatever it's worth, I voted to keep this open. It uses R code as an example, but the underlying question (what do the # of support vectors, etc tell you about the kernel?) is very on-topic... $\endgroup$ Dec 16 '15 at 17:56
  • $\begingroup$ As @MattKrause says, 'how to interpret these results?' is on topic here. However, I don't see the results. Can you paste them in? Can you include the plot? $\endgroup$ Dec 16 '15 at 19:04
1
$\begingroup$

Quite frankly you can't, at least not based on those parameters.

The number of support vectors (both bounded and free) are poor quality indicators of a model. A large amount of support vectors can indicate overfitting, but this is not generally true. The final cost (obj) is also entirely useless for that matter.

What you need is performance estimates, for example through cross-validation.

$\endgroup$
2
  • $\begingroup$ Thanks you for your answer! We have four kernels, so basically we will use tune() to determine the best gamma and cost for every single kernel. With those optical parameters, we test down the accuracy of each kernel to determine which one is best. Is that right? $\endgroup$ Dec 16 '15 at 21:17
  • $\begingroup$ @marc-claesen I would deeply appreciate your attention to this question about SVMs. $\endgroup$ Feb 7 '16 at 14:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.