module_metrics() returns one row per grid-search trial recorded on a
module by optimize_grid() (or GridSearchTeleprompter()). Like
module_trials(), it reads only module$state$trials.
Value
A tibble with one row per trial and columns trial_id, score,
mean_score (the trial score), median_score, std_dev,
n_evaluated, n_errors, params (list-column of the trial's
parameters), scores and yardstick.
Details
The per-example evaluation results are not kept with the trials, so
median_score, std_dev, n_evaluated and n_errors are NA, scores
is empty, and the yardstick metrics requested with metrics are not
computed: the yardstick column is always NULL. Use module_trials() or
top_trials() for trial scores.
See also
Other grid search:
GridSearchTeleprompter(),
module_parameters(),
module_trials(),
optimize_grid()
Examples
# Without trials the result is an empty tibble with these columns
module_metrics(module(signature("text -> sentiment")))
#> # A tibble: 0 × 10
#> # ℹ 10 variables: trial_id <int>, score <dbl>, mean_score <dbl>,
#> # median_score <dbl>, std_dev <dbl>, n_evaluated <int>, n_errors <int>,
#> # params <list>, scores <list>, yardstick <list>