[R] Support vector in lcrabs example
G.C. McGuinness
rs.gmcg at maths.strath.ac.uk
Wed Aug 2 10:20:31 CEST 2006
Can anyone explain the root of my problem?
When I type the following code into R, I receive 42 support
vectors insted of the 21 stated in the book 'Modern Applied
Statistics with S':
library(MASS);
library(e1071);
library(class);
lcrabs <- log(crabs[,4:8]);
(svm(crabs$sp ~ ., data = lcrabs, cost = 100, gamma = 1));
By changing the value of gamma I can obtain only 21 support vectors,
but I not sure where an explanation to my problem can be found. I
use R 2.3.2 and the most recent version of the package 'e1071'. My goal
is to minimise the number of SVs for a separate data set.
Many thanks, Graeme.
More information about the R-help
mailing list