Learn R Programming

MachineShop (version 2.0.0)

SelectedRecipe: Selected Recipe

Description

Recipe selection from a candidate set.

Usage

SelectedRecipe(
  ...,
  control = MachineShop::settings("control"),
  metrics = NULL,
  stat = MachineShop::settings("stat.Train"),
  cutoff = MachineShop::settings("cutoff")
)

Arguments

...

untrained recipes or a list of them.

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. Recipe 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 recipe selection.

cutoff

argument passed to the metrics functions.

Value

SelectedRecipe class object that inherits from recipe.

See Also

fit, resample

Examples

Run this code
# NOT RUN {
library(recipes)
library(MASS)

rec1 <- recipe(medv ~ crim + zn + indus + chas + nox + rm, data = Boston)
rec2 <- recipe(medv ~ chas + nox + rm + age + dis + rad + tax, data = Boston)

fit(SelectedRecipe(rec1, rec2), model = GLMModel)

# }

Run the code above in your browser using DataLab