predict_variable.Rd
Selection of best model for agiven variable based on evaluation metric from a set of models and prediction for target spectra
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
)
Model names prefix, usually defines model type
evaluation statistic which is used to select best model
Should the model with the highest metric be selected? E.g., for R2 set to True. Default is False.
Nested tibble with spc data at different pre-processing steps
Variable for which the best model is to be searched
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