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@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.

Reply via email to