Format metrics for plotting
format_metrics.RdThis formats the metris
Usage
format_metrics(
train_metrics,
test_metrics,
cor_threshold,
cor_metric,
this_model = NULL,
include = NULL,
use = "test",
long = TRUE
)Arguments
- train_metrics, test_metrics
Similarly formatted evaluation metrics for all the models in the grid search. This is saved to an Rds during Yangkang's grid search workflow and is calculated on either the training models or testing models.
- cor_threshold
A threshold in correlation between model distributions and training (S&T) distributions below which models will be excluded for selection by some of the criteria.
- cor_metric
The particular correlation metric to which the threshold is applied - a column in metrics.
- this_model
The model id (in
metrics$model) for the current model. This is used when making a model report to indicate which model the report is for,- include
list of metric columns to include in the output.
- use
either
"test"or"train"indicating which metrics should be plotted.- long
if
TRUEuse long format with metric and value column, otherwise use wider format with a column for each metric.
Value
A modified version of metrics with
models labeled by type. Will include both the best and candidate models.
Columns:
- model
the model file name - used as unique ID
- type
Classified model types. One of the types defined by
identify_best_models()or one ofthis,candidateorlow_cor- metric
one of the metric names - a column in the input
- value
the metric value.