metric-summarizers | R Documentation |
numeric_metric_summarizer()
, class_metric_summarizer()
,
prob_metric_summarizer()
, curve_metric_summarizer()
,
dynamic_survival_metric_summarizer()
, and
static_survival_metric_summarizer()
are useful alongside check_metric and
yardstick_remove_missing for implementing new custom metrics. These
functions call the metric function inside dplyr::summarise()
or
dplyr::reframe()
for curve_metric_summarizer()
. See Custom performance metrics for more
information.
numeric_metric_summarizer(
name,
fn,
data,
truth,
estimate,
...,
na_rm = TRUE,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
class_metric_summarizer(
name,
fn,
data,
truth,
estimate,
...,
estimator = NULL,
na_rm = TRUE,
event_level = NULL,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
prob_metric_summarizer(
name,
fn,
data,
truth,
...,
estimator = NULL,
na_rm = TRUE,
event_level = NULL,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
curve_metric_summarizer(
name,
fn,
data,
truth,
...,
estimator = NULL,
na_rm = TRUE,
event_level = NULL,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
dynamic_survival_metric_summarizer(
name,
fn,
data,
truth,
...,
na_rm = TRUE,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
static_survival_metric_summarizer(
name,
fn,
data,
truth,
estimate,
...,
na_rm = TRUE,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
curve_survival_metric_summarizer(
name,
fn,
data,
truth,
...,
na_rm = TRUE,
case_weights = NULL,
fn_options = list(),
error_call = caller_env()
)
name |
A single character representing the name of the metric to
use in the |
fn |
The vector version of your custom metric function. It
generally takes |
data |
The data frame with |
truth |
The unquoted column name corresponding to the |
estimate |
Generally, the unquoted column name corresponding to
the |
... |
These dots are for future extensions and must be empty. |
na_rm |
A |
case_weights |
For metrics supporting case weights, an unquoted
column name corresponding to case weights can be passed here. If not |
fn_options |
A named list of metric specific options. These
are spliced into the metric function call using |
error_call |
The execution environment of a currently
running function, e.g. |
estimator |
This can either be |
event_level |
This can either be |
numeric_metric_summarizer()
, class_metric_summarizer()
,
prob_metric_summarizer()
, curve_metric_summarizer()
,
dynamic_survival_metric_summarizer()
, and
dynamic_survival_metric_summarizer()
are generally called from the data
frame version of your metric function. It knows how to call your metric over
grouped data frames and returns a tibble
consistent with other metrics.
check_metric yardstick_remove_missing finalize_estimator()
dots_to_estimate()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.