
predict variable (BDF-SSL framework, legacy version)
predict_variable.RdSelection of best model for agiven variable based on evaluation metric from a set of models and prediction for target spectra
Usage
predict_variable(
target_data,
model_folder,
eval_model_folder = model_folder,
prefix = "cubist_",
variable_ = "CORG",
metric = "test.rmse",
maximise = F,
restrict = T,
diss_limit = 2.5,
manual = NA
)Arguments
- prefix
Model names prefix, usually defines model type
- 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.
- taget_data
Nested tibble with spc data at different pre-processing steps
- variable
Variable for which the best model is to be searched
- restrict_spc
If True only regard models for which spc preprocessing sets are available. If False, search in all models for best candidate and return ERROR when spc set for best candidate is not available