[ top | up ]
Predict New Examples by a Trained Neural Net
Usage
predict.nnet(object, x, type=c("raw","class"))
Arguments
object
|
an object of class nnet as returned by nnet .
|
x
|
matrix or data frame of test examples. A vector is considered
to be a row vector comprising a single case.
|
Description
This function is a method for the generic function
predict()
for class nnet
.
It can be invoked by calling predict(x)
for an
object x
of the appropriate class, or directly by
calling predict.nnet(x)
regardless of the class of the object.
Value
If type="raw"
, the matrix of values returned by the trained network;
if type="class"
, the corresponding class (which is probably only
useful if the net was generated by nnet.formula
.
See Also
nnet
, which.is.max
Examples
##--> See examples in ?nnet