Re: [R] Support vector in lcrabs example

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Wed 02 Aug 2006 - 19:32:51 EST

The examples in the book were run in 2001, using S-PLUS (as it says). The R package e1071 has changed since then, and hence the results it gives have changed. However, the S-PLUS version (which has not been updated) still gives the results in the book.

The `problem' is your expectation that R in 2006 is identical to S-PLUS in 2001.

On Wed, 2 Aug 2006, G.C. McGuinness wrote:

> 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.

There is no `R 2.3.2'.

> Many thanks, Graeme.
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.
>

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch 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 Wed Aug 02 22:42:15 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 03 Aug 2006 - 00:18:40 EST.

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