Computes a score estimate given different sets of data, and returns the estimate and the relative standard error
Computes a score estimate given different sets of data, and returns the estimate and the relative standard error
Usage
summary_score(scorer, true, pred, weights, ...)
# S4 method for Scorer,list,list
summary_score(
scorer,
true,
pred,
weights = NULL,
multi = c("average", "sum"),
grouped = TRUE,
min.obs = 3,
logger,
return.raw = FALSE,
confidence = 0.95,
distribution = "normal",
...
)
# S4 method for ScorerList,list,list
summary_score(
scorer,
true,
pred,
weights = NULL,
multi = c("average", "sum"),
grouped = TRUE,
logger,
...
)
Arguments
- scorer
a ScorerList object
- true
a list of vectors (or matrices) of observed values. If list elements are matrices, a multi-response is assumed
- pred
a list of vectors (or matrices) of predicted values
- weights
a list of vectors of observation weights
- ...
further arguments to scorer function
- multi
what to do when response has multiple output values
average
errors of multiple outputs are averaged to get a single value for each observation
sum
errors of multiple outputs are summed up to get a single value for each observation
- grouped
logical, whether to compute separate statistics when lists of values are provided
- min.obs
integer, minimum number of observations per list. If the number of observations per list is less than
min.obs
, an attempt to compute errors at the observation level (for the unlisted observations) and then summarise is made (equivalent togrouped = FALSE
). It is working only for certain accuracy measures. Default ismin.obs = 3
. Setmin.obs = 0
to suppress.- logger
a Logger object
- return.raw
logical, whether to return scores used to compute estimate
Value
list of 2 elements containing a score estimate and its standard error
list containing the score estimate and its standard error for each Scorer in the ScorerList