An S4 class providing the methods to compute an accuracy measure.
The object consists of 6 slots
Constructor for the S4 Scorer object.
Usage
Scorer(
id,
scorer,
parameters,
resp.type,
grouped = TRUE,
selector,
optimum,
quantifier = Quantifier(),
logger = Logger()
)Arguments
- id
the scoring method name associated to this Scorer. If scoring method is one of the accuracy measures supported by renoir, the constructor will automatically select a
scorerand aselector. Seesupported_scoring_methods()for the supported methods.- scorer
(optional) function to evaluate a model performance. Must be provided if
idis not one of the accuracy measures supported by renoir. Ifscoreris provided it must conform to the renoir common interface, and must have the following formal arguments:- true
a vector (or a matrix) of observed values. If a matrix is provided, a multi-response is assumed
- pred
a vector (or a matrix) of predicted values
- weights
priors of the observations
- multi
what to do when response has multiple output values
- ...
additional arguments can be added
- parameters
list containing the parameters to fix for the chosen scoring method
- resp.type
(optional) response type. If provided, the selected
idis checked to see if available for the considered response type.- grouped
logical, whether to compute separate statistics when lists of values are provided
- selector
(optional) function to select optimal accuracy measure from multiple values Must be provided if
idis not one of the accuracy measures supported by renoir. Ifselectoris provided it must conform to the renoir common interface, and must have the following formal arguments:- measures
a vector of accuracy measures returned by this Scorer
- optimum
the optimisation problem to solve for selecting the optimal accuracy measure from multiple values
- quantifier
- logger
a Logger
Slots
idthe accuracy measure
scorerfunction to be used for scoring
parameterslist containing the parameters to fix for the scoring function
groupedlogical, whether to compute separate statistics when lists of values are provided
selectorfunction to select optimal measure given a vector of values
optimumthe optimisation problem to solve for selecting the optimal accuracy measure. Two possible values are
minandmaxquantifierloggera Logger