Deploy a model to predict outcomes from the data.
# S4 method for ExprsMachine
predict(object, array, verbose = TRUE)# S4 method for ExprsModule
predict(object, array, verbose = TRUE)
# S4 method for RegrsModel
predict(object, array, verbose = TRUE)
# S4 method for ExprsEnsemble
predict(object, array, how = "probability",
verbose = TRUE)
An ExprsModel
or ExprsEnsemble
object.
An ExprsArray
object. The target data.
A logical scalar. Argument passed to calcStats
.
A character string. Select from "probability" or "majority". See Details. Argument applies to binary classifier ensembles only.
Returns an ExprsPredict
or RegrsPredict
object.
Models can only get deployed on an object of the type used to build
the model. Binary classification and regression are handled natively
by the machine learning algorithm chosen. Multi-class classification
is handled by doMulti
. Note that a validation set
should never get modified once separated from the training set.
See buildEnsemble
to learn about ensembles.
For binary classifier ensembles, when how = "probability"
, outcomes
are based on the average class probability (via @probability
)
estimated by each deployed model. When how = "majority"
, outcomes
are based on consensus voting whereby each deployed model casts a single
(all-or-nothing) vote (via @pred
) in a winner takes all approach.
In both scenarios, ties get broken randomly (as weighted by class).
For multi-class classifier ensembles, outcomes are based on the
how = "majority"
method from above. For regression ensembles,
outcomes are based on the average predicted value.