gwplot
, a method for objects of class nn
, typically produced
by neuralnet
. Plots the generalized weights (Intrator and Intrator,
1993) for one specific covariate and one response variable.
gwplot(x, rep = NULL, max = NULL, min = NULL, file = NULL,
selected.covariate = 1, selected.response = 1, highlight = FALSE,
type = "p", col = "black", ...)
an object of class nn
an integer indicating the repetition to plot. If rep="best", the repetition with the smallest error will be plotted. If not stated all repetitions will be plotted.
maximum of the y axis. In default, max is set to the highest y-value.
minimum of the y axis. In default, min is set to the smallest y-value.
a character string naming the plot to write to. If not stated, the plot will not be saved.
either a string of the covariate's name or an integer of the ordered covariates, indicating the reference covariate in the generalized weights plot. Defaulting to the first covariate.
either a string of the response variable's name or an integer of the ordered response variables, indicating the reference response in the generalized weights plot. Defaulting to the first response variable.
a logical value, indicating whether to highlight (red color) the best repetition (smallest error). Only reasonable if rep=NULL. Default is FALSE
a character indicating the type of plotting; actually any of the
types as in plot.default
.
a color of the generalized weights.
Arguments to be passed to methods, such as graphical parameters
(see par
).
Intrator O. and Intrator N. (1993) Using Neural Nets for Interpretation of Nonlinear Models. Proceedings of the Statistical Computing Section, 244-249 San Francisco: American Statistical Society (eds.)
# NOT RUN { data(infert, package="datasets") print(net.infert <- neuralnet(case~parity+induced+spontaneous, infert, err.fct="ce", linear.output=FALSE, likelihood=TRUE)) gwplot(net.infert, selected.covariate="parity") gwplot(net.infert, selected.covariate="induced") gwplot(net.infert, selected.covariate="spontaneous") # }