exprso (version 0.5.1)

exprso-predict: Deploy Model

Description

Deploy a model to predict outcomes from the data.

Usage

# 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)

Arguments

object

An ExprsModel or ExprsEnsemble object.

array

An ExprsArray object. The target data.

verbose

A logical scalar. Argument passed to calcStats.

how

A character string. Select from "probability" or "majority". See Details. Argument applies to binary classifier ensembles only.

Value

Returns an ExprsPredict or RegrsPredict object.

Details

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.