predict.ERWNN {RWNN} | R Documentation |
Predicting targets of an ERWNN-object
Description
Predicting targets of an ERWNN-object
Usage
## S3 method for class 'ERWNN'
predict(object, ...)
Arguments
object |
An ERWNN-object. |
... |
Additional arguments. |
Details
The additional arguments 'newdata
', 'type
', and 'class
' can be specified as follows:
newdata
Expects a matrix or data.frame with the same features (columns) as in the original data.
type
A string taking the following values:
"mean" (default)
Returns the average prediction across all ensemble models.
"std"
Returns the standard deviation of the predictions across all ensemble models.
"all"
Returns all predictions for each ensemble models.
class
A string taking the following values:
"classify"
Returns the predicted class of the ensemble. If used together with
type = "mean"
, the average prediction across the ensemble models are used to create the classification. However, if used withtype = "all"
, every ensemble is classified and returned."voting"
Returns the predicted class of the ensemble by classifying each ensemble and using majority voting to make the final prediction. NB: the
type
argument is overruled.
Furthermore, if 'class
' is set to either "classify"
or "voting"
, additional arguments 't
' and 'b
' can be passed to the classify-function.
NB: if the ensemble is created using the boost_rwnn-function, then type
should always be set to "mean"
.
Value
An list, matrix, or vector of predicted values depended on the arguments 'method
', 'type
', and 'class
'.