I've never used neuralnet, but if this is like other modelling functions in R, you need to put the column names corresponding to the outputs, not the name of the object they came from. They might have been changed in creating the data frame so take a look at colnames(dt)
Hope that helps, Michael On Wed, Feb 15, 2012 at 3:31 PM, Luc MOULINIER <mou...@igbmc.fr> wrote: > Hello List ! > > I'm a bright new R user, and I encounter a problem when trying to use the > neuralnet package. > I have a training set with 8 inputs, and there are 3 outputs (I need 3 > distinct neurones as output). Although I read the examples, and the package > article, I don't know how to tell R there are 3 outputs (3 outputs neurones). > > Here is my actual code : > > # All = input data > All <- read.table('in.dat') > colnames(All) <- paste('col',1:ncol(All),sep='') > # Val = target values, matrix of n rows X 3 columns > Val <- read.table('target.dat') > > # create dataframe > dt <- data.frame(Val,All) > > nn <- neuralnet(Val ~ col1+col2+col3+col4+col5+col6+col7+col8,data=dt) > > Is there someone kind enough to correct my code ? > > Many many thanks in advance !! > > Luc > > > > > ---------------------------------------------------------------- > Dr. Luc Moulinier, > Laboratoire de Biologie et Génomique Intégratives > IGBMC > 1, rue Laurent Fries > 67 404 ILLKIRCH Cedex > Phone : +33 (0)3 88 65 32 79 > > ______________________________________________ > R-help@r-project.org 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@r-project.org 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.