View source: R/evaluate_models.R
evaluate_models | R Documentation |
Evaluate the model runs produced by a call to alternate()
with
user-defined error functions.
evaluate_models(
x,
eval_funs = NULL,
eval_weights = 1,
param_cols,
eval_cols,
n_best = NULL,
f_best = 0.01,
scaling_fun = scale_min_median,
...
)
## S3 method for class 'cfp_altres'
evaluate_models(
x,
eval_funs = NULL,
eval_weights = 1,
param_cols = cfp_id_cols(cfp_layers_map(cfp_og_model(x))),
eval_cols = NULL,
n_best = NULL,
f_best = 0.01,
scaling_fun = scale_min_median,
...
)
x |
A cfp_altres object, as returned by |
eval_funs |
A named list of evaluation functions. Each function must
accept the arguments |
eval_weights |
A vector of weights the same length of |
param_cols |
The columns that, together, define different parameters
(e.g. different gases) for which NRMSEs should be calculated separately
(e.g. "gas"). Defaults to the id_cols of layers_map. If no such distinction
is wished, set to |
eval_cols |
A character vector of columns for which the model error
should be returned separately. Must be a subset of |
n_best |
An integer number of runs to select as the best runs. |
f_best |
A numeric between 0 to 1 as the fraction of runs to select as the best. Defaults to 0.01. |
scaling_fun |
A scaling function. Defaults to min-median scaling. |
... |
Any arguments that need to be passed to the |
A list with components best_runs
the runs with the lowest model
error (ME), model_error
the model error for all runs,
models_evaluated
the raw values returned by error_funs and
best_runs_runmap
, a cfp_run_map()
which can be used to rerun the
best_runs
model configurations. Note, that for best_runs_runmap
the
value of run_id
is remapped to values 1:n_best
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.