Computes a score estimate given different sets of data
Computes a score estimate given different sets of data
Usage
mean_score(scorer, true, pred, weights, ...)
# S4 method for Scorer,list,list
mean_score(
scorer,
true,
pred,
weights = NULL,
multi = c("average", "sum"),
grouped = TRUE,
min.obs = 3,
logger,
...
)
# S4 method for ScorerList,list,list
mean_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
averageerrors of multiple outputs are averaged to get a single value for each observation
sumerrors 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 = 0to suppress.- logger
a Logger object
Value
the computed score estimate (the average error)
list containing the computed score estimate (the average error) for each Scorer in the ScorerList