Computes scores for different sets of data
Computes scores for different sets of data
Usage
score(scorer, true, pred, weights, ...)
# S4 method for Scorer,ANY,ANY
score(scorer, true, pred, weights = NULL, ...)
# S4 method for Scorer,list,list
score(
scorer,
true,
pred,
weights = NULL,
multi = c("average", "sum"),
grouped = TRUE,
min.obs = 3,
logger,
...
)
# S4 method for ScorerList,ANY,ANY
score(
scorer,
true,
pred,
weights = NULL,
multi = c("average", "sum", "raw"),
logger,
...
)
# S4 method for ScorerList,list,list
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
Value
the computed accuracy measure
the computed accuracy measure
the computed accuracy measure for each Scorer in the ScorerList
the computed accuracy measure for each Scorer in the ScorerList