prediction, a method for objects of class
neuralnet. In a first step, the dataframe will be
amended by a mean response, the mean of all responses corresponding to the
same covariate-vector. The calculated data.error is the error function
between the original response and the new mean response. In a second step,
all duplicate rows will be erased to get a quick overview of the data. To
obtain an overview of the results of the neural network and the glm objects,
the covariate matrix will be bound to the output of the neural network and
the fitted values of the glm object(if available) and will be reduced by all
an optional list of glm objects
a list of the summaries of the repetitions of the neural networks, the data and the glm objects (if available).
Stefan Fritsch, Frauke Guenther email@example.com
1 2 3 4 5 6 7 8 9 10
Var1 <- rpois(100,0.5) Var2 <- rbinom(100,2,0.6) Var3 <- rbinom(100,1,0.5) SUM <- as.integer(abs(Var1+Var2+Var3+(rnorm(100)))) sum.data <- data.frame(Var1,Var2,Var3, SUM) print(net.sum <- neuralnet( SUM~Var1+Var2+Var3, sum.data, hidden=1, act.fct="tanh")) main <- glm(SUM~Var1+Var2+Var3, sum.data, family=poisson()) full <- glm(SUM~Var1*Var2*Var3, sum.data, family=poisson()) prediction(net.sum, list.glm=list(main=main, full=full))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.