switch_model | R Documentation |
Switches a model with another model in its associated grid.
switch_model(
nano,
model_id,
model_no,
varimp_eval = FALSE,
pdp_eval = FALSE,
ice_eval = FALSE,
interaction_eval = FALSE,
plot = FALSE
)
nano |
|
model_id |
model_id of the new model to be switched to |
model_no |
position in the list of models of the model to be replaced. |
varimp_eval |
calculate variable importance for the new model. |
pdp_eval |
calculate partial dependencies for the new model. If |
interaction_eval |
calculates the interactions for the new model. Follows same logic as |
Switches a model in a nano
object with another model in its associated grid. By default, when a new grid is produced, the
model with the best metric (chosen by the user) is set as the associated model for that grid. Hence, the user may call this function
to select a different model from the built grid instead. The model_no
is the position in the list of models of the model to be
replaced. The model_id
is the model_id of the new model which is to replace the original model. The new model must exist in the
associated grid of the original model.
a nano
object with the original model replaced by the new model specified by the model_id
.
## Not run:
if(interactive()){
# switches the second model in the list nano$model with the model with model_id "grid_2_model_3"
nano <- switch_model(nano, 2, "grid_2_model_3")
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.