[R] Neuralnet Error
R. Michael Weylandt
michael.weylandt at gmail.com
Thu Aug 2 01:06:20 CEST 2012
Hi -- this isn't really reproducible: can you follow the advice given
here and make a small reproducible example:
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
Best,
Michael
On Wed, Aug 1, 2012 at 12:51 PM, Rahul Bhalla
<rahulbhalla_3521 at yahoo.com> wrote:
> I require some help in debugging this code
>
> library(neuralnet)
> ir<-read.table(file="iris_data.txt",header=TRUE,row.names=NULL)
> ir1 <- data.frame(ir[1:100,2:6])
> ir2 <- data.frame(ifelse(ir1$Species=="setosa",1,ifelse(ir1$Species=="versicolor",0,"")))
> colnames(ir2)<-("Output")
> ir3 <- data.frame(rbind(ir1[1:4],ir2))
> #rownames(ir3)<-c("SL","SW","PL","PW","Output")
> print(ir3)
> n<- neuralnet(Output~Sepal.Length+Sepal.Width+Petal.Length+Petal.Width,data=ir3,err.fct="sse",hidden=2,linear.output=FALSE)
>
> Output:
>
> Error in neurons[[i]] %*% weights[[i]] :
> requires numeric/complex matrix/vector arguments
>
> Any assisstance is appreciated
> [[alternative HTML version deleted]]
>
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list