Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

SelectedModel

Selected Model


Description

Model selection from a candidate set.

Usage

SelectedModel(
  ...,
  control = MachineShop::settings("control"),
  metrics = NULL,
  stat = MachineShop::settings("stat.train"),
  cutoff = MachineShop::settings("cutoff")
)

Arguments

...

model functions, function names, calls, or vectors of these to serve as the candidate set from which to select, such as that returned by expand_model.

control

control function, function name, or call defining the resampling method to be employed.

metrics

metric function, function name, or vector of these with which to calculate performance. If not specified, default metrics defined in the performance functions are used. Model selection is based on the first calculated metric.

stat

function or character string naming a function to compute a summary statistic on resampled metric values for model selection.

cutoff

argument passed to the metrics functions.

Details

Response Types:

factor, numeric, ordered, Surv

Value

SelectedModel class object that inherits from MLModel.

See Also

Examples

## Requires prior installation of suggested package gbm and glmnet to run

model_fit <- fit(sale_amount ~ ., data = ICHomes,
                 model = SelectedModel(GBMModel, GLMNetModel, SVMRadialModel))
(selected_model <- as.MLModel(model_fit))
summary(selected_model)

MachineShop

Machine Learning Models and Tools

v2.8.0
GPL-3
Authors
Brian J Smith [aut, cre]
Initial release
2021-04-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.