
get best model for variable based on metric
get_best.RdFrom a folder containing model object created with scripts used in the BDF-SSL framework, select the best model candidate based on a evaluation metric for a given variable.
Usage
get_best(
model_eval,
type_ = "cubist",
prefix = NULL,
variable_ = "CORG",
metric = "test.rmse",
maximise = F
)Arguments
- model_eval
model evaluation object created with evaluate_model_batch()
- type_
Model type, i.e., "cubist", "pls", "svmLinear"...
- prefix
Model names prefix, usually defines model type. Default is type_
- variable_
Variable for which the best model is to be searched
- metric
evaluation statistic which is used to select best model
- maximise
Should the model with the highest metric be selected? E.g., for R2 set to True. Default is False.