Dear Charles, Thanks for your guide. I run this code:
library("neuralnet") resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1) mydata <- cbind(data, resp) out1 <- neuralnet(resp~mydata[,1:3110],data=mydata, hidden = 4, lifesign = "minimal", linear.output = FALSE, threshold = 0.1) I saw this error Error in neurons[[i]] %*% weights[[i]] : non-conformable arguments :(:(:( What should I do now?? Regards, Soheila On Tue, Mar 24, 2015 at 3:48 PM, Charles Determan Jr <deter...@umn.edu> wrote: > Hi Soheila, > > You are using the formula argument incorrectly. The neuralnet function > has a separate argument for data aptly names 'data'. You can review the > arguments by looking at the documentation with ?neuralnet. > > As I cannot reproduce your data the following is not tested but I think > should work for you. > > # Join your response variable to your data set. > mydata <- cbind(data, resp) > > # Run neuralnet > out <- neuralnet(resp ~ ., data=mydata, hidden = 4, lifesign = "minimal", > linear.output = FALSE, threshold = 0.1,na.rm = > TRUE) > > > Best, > Charles > > On Tue, Mar 24, 2015 at 4:47 AM, Soheila Khodakarim <lkhodaka...@gmail.com > > wrote: > >> Dear All, >> >> I want to run "neural network" on my dataset. >> ########################################################## >> resp<-c(1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,1,0,1,0,1) >> dim(data) >> #20*3110 >> >> out <- neuralnet(y ~ data, hidden = 4, lifesign = "minimal", linear.output >> = FALSE, threshold = 0.1,na.rm = TRUE) >> ################################################################ >> but I see this Error >> Error in varify.variables(data, formula, startweights, learningrate.limit, >> : >> argument "data" is missing, with no default >> >> What should I do now?? >> >> Best Regards, >> Soheila >> >> [[alternative HTML version deleted]] >> >> ______________________________________________ >> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >> > > > > > [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.