remove_model: Remove model from model grid

View source: R/remove_model.R

remove_modelR Documentation

Remove model from model grid

Description

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

Usage

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

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

modelgrid documentation built on May 29, 2024, 7:56 a.m.