[R] N.network help

Javad Bayat bayat194 at yahoo.com
Wed Nov 19 13:29:09 CET 2014


Dear all;I want to do N.network for pH and predict its future.but when I run the code and plot them (the measured data and the predicted), the predicted data in all station are same.i do not know what is wrong with this. Here are the codes that I used:"fit  <- neuralnet(pH ~ station.2 + Day,data = bayat2)## create new data into the futurefuturedata <- expand.grid(station.2 = 1:5, Day = 511:1000)
## do predictionspredictions <- compute(fit, futuredata)predictions2 <- data.frame(predictions[["neurons"]][[1]][,2:3], pH = predictions$net.result)head(predictions2)## plot the results together with original datalibrary(lattice)library(latticeExtra)xyplot(pH ~ Day|factor(station.2), data = bayat2, type = "b", layout = c(3,2), xlim = c(0:1000))+xyplot(pH ~ Day|factor(station.2), data = predictions2, type = "b", layout = c(4,2), col = "red")"

Many thanks.
 Best Regards
Javad Bayat
Alternative Mail: j.bayat194 at gmail.com
	[[alternative HTML version deleted]]



More information about the R-help mailing list