set_model_arg {modelenv} | R Documentation |
Register Argument for Model
Description
This function is used to register argument information for a model and engine combination.
Usage
set_model_arg(model, eng, exposed, original, func, has_submodel)
get_model_arg(model, eng)
Arguments
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. |
Details
This function needs to be called once for each argument that you are exposing.
Value
A tibble
Examples
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