I have no idea what you are actually doing. When I run the code in the book the output begins
fold 1 size = 6 decay = 0.001 inner fold 1 2 3 4 5 and those are the default values. You *have* altered something, and it is not reasonable to expect R-help readers to debug your code (especially not for a commercial user). On Mon, 14 Jun 2004, Manoj - Hachibushu Capital wrote: > Thanks for the prompt reply. I don't think I am using any non default > arguments but still...here is the exact syntax for two different case > (skip = T and default) and the corresponding error message that I > receive. > > > Default Case ("skip = F") > > Syntax : nn.test <- > CVnn2(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11,all.data.norm[1:train.set,],m > axit=500,nreps=10) > > Error message: > Fold 1 > Size = 0 decay = 0 > Inner fold 1Error in nnet.default(x,y,w.....) : No > weights to fit. > > > > Case where Skip = T: > > Syntax: nn.test <- > CVnn2(Y~X1+X2+X3+X4+X5+X6+X7+X8+X9+X10+X11,all.data.norm[1:train.set,],m > axit=500,nreps=10,skip=T) > > Error message: > Fold 1 > Size=0 decay = 0 > Inner fold 1Error in switch(type,raw=z,class= { : inappropriate > fit for class > > > Manoj > > -----Original Message----- > From: Prof Brian Ripley [mailto:[EMAIL PROTECTED] > Sent: Monday, June 14, 2004 8:26 PM > To: Manoj - Hachibushu Capital > Cc: [EMAIL PROTECTED] > Subject: Re: [R] CVnn2 + nnet question > > You are trying to fit a neural network with no connections. That makes > no > sense unless skip=T (as on the page you are quoting). > > On Mon, 14 Jun 2004, Manoj - Hachibushu Capital wrote: > > > Hi, > > I am trying to determine the number of units in the hidden layer > > and the decay rate using the CVnn2 script found in MASS directory > > (reference: pg 348,MASS-4). > > > > The model that I am using is in the form of Y ~ X1 + X2 + X3... > > + X11 and the underlying data is time-series in nature. > > > > I found the MASS and nnet package extremely useful (many thanks > > to the contributors). > > `contributors'? Do see the DESCRIPTION file: it is hardly anonymous > work. > > > However I am getting an error while using the CVnn2 > > function...it says > > You have not shown us the call you used, but the default arguments are > size = rep(6, 2), lambda = c(0.001, 0.01) so you have used non-default > args without telling us what. > > > Fold 1 > > Size = 0, decay = 0, inner fold 1 Error in nnet.default(x,y,w,....): > No > > weights to fit. > > > > Obliviously I am doing something wrong but am not able to figure > > it out. > > Please do re-read the basic description of neural nets and nnet(). > > > Do I have pass any weights? I am bit confused since the > > documentation of nnet suggests says "Wts: initial parameter vector. If > > missing chosen at Random". Has anybody faced the same error? I am > using > > the latest R version on Linux box. > > -- 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, UK Fax: +44 1865 272595 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html