Hi, I repost my question following the guide: trn3 is my dataset: > str(trn3) `data.frame': 7361 obs. of 209 variables: $ V1 : num -0.931 -0.955 -0.843 -0.963 -0.967 ... $ V2 : num -0.4343 -0.0101 0.0707 -0.0909 -1.0000 ... $ V3 : num -0.979 -0.979 -0.979 -0.980 -0.979 ... $ V4 : num -0.987 -0.987 -0.987 -0.990 -0.987 ... $ V5 : num -0.979 -0.979 -0.979 -0.980 -0.979 ... $ V6 : num -1 -1 -1 -1 -1 ... $ V7 : Factor w/ 2 levels "-1","1": 1 1 1 2 1 2 2 1 1 2 ... ... $ V205: Factor w/ 2 levels "-1","1": 1 1 1 1 1 1 2 1 2 2 ... $ V206: num -1 -1 -1 -1 -1 ... $ V207: Factor w/ 2 levels "-1","1": 2 2 2 2 2 2 2 2 2 2 ... $ V208: Factor w/ 2 levels "-1","1": 1 1 1 1 1 1 1 1 1 1 ... $ V209: Factor w/ 2 levels "-1","1": 1 1 1 1 1 2 2 1 1 1 ...
r.v. basically contained the indice of variables whose importance were evaluated from MeanDecreaseGini from randomForest, ordered descreasingly. So, r.v[1:100] means the first 100 important variables. > R.version _ platform i686-redhat-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major 2 minor 1.1 year 2005 month 06 day 20 language R > traceback() 2: nnet.default(x = trn3[, r.v[1:100]], y = trn3[, 209], size = 5, decay = 5e-04, maxit = 200) 1: nnet(x = trn3[, r.v[1:100]], y = trn3[, 209], size = 5, decay = 5e-04, maxit = 200) nnet is from library(nnet) I need to say I read the post guide before. But I just did not want to take too much time from people, so I did not put details here. Weiwei On 10/11/05, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > Weiwei Shi wrote: > > > Hi, there: > > I am trying nnet as followed: > > > >>mg.nnet<-nnet(x=trn3[,r.v[1:100]], y=trn3[,209], size=5, decay = 5e-4, > > > > maxit = 200) > > # weights: 511 > > initial value 13822.108453 > > iter 10 value 7408.169201 > > iter 20 value 7362.201934 > > iter 30 value 7361.669408 > > iter 40 value 7361.294379 > > iter 50 value 7361.045190 > > final value 7361.038121 > > converged > > Error in y - tmp : non-numeric argument to binary operator > > > > Please help! > > > Please ask appropriately (we pointed you to the posting guide dozens of > times now)! > > - We do neither have trn3 nor r.v > - Which function nnet() are we talking about? Do you meant the one from > package nnet in the VR bundle? > - Which version of R and nnet are we talking about? > - What about trying to debug yourself in a first step? E.g. a > traceback() might give you (and us) some first hints what is going on. > > Uwe Ligges > > > > > > > > Thanks, > > > > Weiwei > > > > -- > > Weiwei Shi, Ph.D > > > > "Did you always know?" > > "No, I did not. But I believed..." > > ---Matrix III > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > [email protected] mailing list > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide! > http://www.R-project.org/posting-guide.html > > -- Weiwei Shi, Ph.D "Did you always know?" "No, I did not. But I believed..." ---Matrix III [[alternative HTML version deleted]] ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
