View source: R/set_model_arg.R
set_model_arg | R Documentation |
This function is used to register argument information for a model and engine combination.
set_model_arg(model, eng, exposed, original, func, has_submodel)
get_model_arg(model, eng)
model |
A single character string for the model type (e.g. |
eng |
A single character string for the model engine. |
exposed |
A single character string for the "harmonized" argument name that the modeling function exposes. |
original |
A single character string for the argument name that underlying model function uses. |
func |
A named character vector that describes how to call a function.
|
has_submodel |
A single logical for whether the argument can make predictions on multiple submodels at once. |
This function needs to be called once for each argument that you are exposing.
A tibble
set_new_model("shallow_learning_model")
set_model_mode("shallow_learning_model", "partition")
set_model_engine("shallow_learning_model", "partition", "stats")
set_model_arg(
model = "shallow_learning_model",
eng = "stats",
exposed = "method",
original = "method",
func = list(pkg = "stats", fun = "lm"),
has_submodel = FALSE
)
get_model_arg("shallow_learning_model", "stats")
get_model_arg("shallow_learning_model", "stats")$func
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.