remove_model: Remove model from model grid

Description Usage Arguments Value Examples

Description

Removes an individual model specification from a model grid. If the model has been trained, the fitted model will also be deleted.

Usage

1
remove_model(model_grid, model_name)

Arguments

model_grid

model_grid

model_name

character, the unique name (as set by the user) of the model, which will be removed from a model grid.

Value

model_grid

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(magrittr)

# Pre-allocate empty model grid.
mg <- model_grid()

# Add random forest model.
mg <-
  mg %>%
  add_model(model_name = "Random Forest Test", method = "rf", tuneLength = 5)

# Remove random forest model again.
remove_model(mg, model_name = "Random Forest Test")

smaakage85/modelgrid documentation built on May 30, 2019, 12:48 p.m.