check_metric {yardstick} | R Documentation |
Developer function for checking inputs in new metrics
Description
check_numeric_metric()
, check_class_metric()
, and check_prob_metric()
are useful alongside metric-summarizers for implementing new custom
metrics. metric-summarizers call the metric function inside
dplyr::summarise()
. These functions perform checks on the inputs in
accordance with the type of metric that is used.
Usage
check_numeric_metric(truth, estimate, case_weights, call = caller_env())
check_class_metric(
truth,
estimate,
case_weights,
estimator,
call = caller_env()
)
check_prob_metric(
truth,
estimate,
case_weights,
estimator,
call = caller_env()
)
check_dynamic_survival_metric(
truth,
estimate,
case_weights,
call = caller_env()
)
check_static_survival_metric(
truth,
estimate,
case_weights,
call = caller_env()
)
Arguments
truth |
The realized vector of
|
estimate |
The realized
|
case_weights |
The realized case weights, as a numeric vector. This must
be the same length as |
call |
The execution environment of a currently
running function, e.g. |
estimator |
This can either be |