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

- Detailed performance results:
   size      error dispersion
1    1 0.01333333 0.02810913
2    2 0.02666667 0.04661373
3    3 0.02666667 0.04661373
4    4 0.02000000 0.04499657
5    5 0.02666667 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.

Reply via email to