View source: R/auxiliary_functions.R
predict.ERWNN | R Documentation |
Predicting targets of an ERWNN-object
## S3 method for class 'ERWNN'
predict(object, ...)
object |
An ERWNN-object. |
... |
Additional arguments. |
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 with type = "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"
.
An list, matrix, or vector of predicted values depended on the arguments 'method
', 'type
', and 'class
'.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.