Re: [R] nnet 10-fold cross-validation

2007-07-24 Thread David Meyer
Hi all,

there is tune() in the e1071 package for doing this in general, and, 
among others, a tune.nnet() wrapper (see ?tune):


 > tmodel = tune.nnet(Species ~ ., data = iris, size = 1:5)
 > summary(tmodel)

Parameter tuning of `nnet':

- sampling method: 10-fold cross validation

- best parameters:
  size
 1

- best performance: 0.0133

- Detailed performance results:
   size  error dispersion
11 0.0133 0.02810913
22 0.0267 0.04661373
33 0.0267 0.04661373
44 0.0200 0.04499657
55 0.0267 0.04661373

 > plot(tmodel)
 > tmodel$best.model
a 4-1-3 network with 11 weights
inputs: Sepal.Length Sepal.Width Petal.Length Petal.Width
output(s): Species
options were - softmax modelling

etc.

Best
David



On 7/23/07, S.O. Nyangoma <[EMAIL PROTECTED]> wrote:
 > > Hi
 > > It clear that to do a classification with svm under 10-fold cross
 > > validation one uses
 > >
 > > svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross =
 > > 10)
 > >
 > > What corresponds to the nnet?
 > > nnet(.,cross=10)?

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


Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Saeed Abu Nimeh
do it manually. divide your dataset into 10 parts then train and test
accordingly.
Saeed


S.O. Nyangoma wrote:
> Hi
> It clear that to do a classification with svm under 10-fold cross 
> validation one uses
> 
> svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross = 
> 10)
> 
> What corresponds to the nnet?
> nnet(.,cross=10)?
> 
> Regards
> 
> __
> 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.
>

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


Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Prof Brian Ripley
Please read the documentation.  nnet() is support software for a book, and 
that has explicit examples of this, which you will find in the scripts of 
the VR bundle (but I don't expect them to be comprehensible without the 
book).

On Mon, 23 Jul 2007, S.O. Nyangoma wrote:

> Hi
> It clear that to do a classification with svm under 10-fold cross
> validation one uses
>
> svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross =
> 10)
>
> What corresponds to the nnet?
> nnet(.,cross=10)?
>
> Regards
>
> __
> 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,  [EMAIL PROTECTED]
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, UKFax:  +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.


Re: [R] nnet 10-fold cross-validation

2007-07-23 Thread Wensui Liu
there is no such thing in nnet(), if i understand correctly.
how hard it is to code one though?

On 7/23/07, S.O. Nyangoma <[EMAIL PROTECTED]> wrote:
> Hi
> It clear that to do a classification with svm under 10-fold cross
> validation one uses
>
> svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross =
> 10)
>
> What corresponds to the nnet?
> nnet(.,cross=10)?
>
> Regards
>
> __
> 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.
>


-- 
===
"I am dying with the help of too many
physicians." - Alexander the Great, on his deathbed
===
WenSui Liu
(http://spaces.msn.com/statcompute/blog)

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


[R] nnet 10-fold cross-validation

2007-07-23 Thread S.O. Nyangoma
Hi
It clear that to do a classification with svm under 10-fold cross 
validation one uses

svm(Xm, newlabs, type = "C-classification", kernel = "linear",cross = 
10)

What corresponds to the nnet?
nnet(.,cross=10)?

Regards

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