A measure object encapsulates a function to evaluate the performance of a
prediction. Information about already implemented measures can be obtained
A learner is trained on a training set d1, results in a model m and predicts
another set d2 (which may be a different one or the training set) resulting
in the prediction. The performance measure can now be defined using all of
the information of the original task, the fitted model and the prediction.
properties = character(0L),
extra.args = list(),
aggr = test.mean,
best = NULL,
worst = NULL,
name = id,
note = ""
Name of measure.
Should the measure be minimized?
Set of measure properties. Some standard property names include:
- classif: Is the measure applicable for classification?
- classif.multi: Is the measure applicable for multi-class classification?
- multilabel: Is the measure applicable for multilabel classification?
- regr: Is the measure applicable for regression?
- surv: Is the measure applicable for survival?
- cluster: Is the measure applicable for cluster?
- costsens: Is the measure applicable for cost-sensitive learning?
- req.pred: Is prediction object required in calculation? Usually the case.
- req.truth: Is truth column required in calculation? Usually the case.
- req.task: Is task object required in calculation? Usually not the case
- req.model: Is model object required in calculation? Usually not the case.
- req.feats: Are feature values required in calculation? Usually not the case.
- req.prob: Are predicted probabilities required in calculation? Usually not the case, example would be AUC.
function(task, model, pred, feats, extra.args))
Calculates the performance value. Usually you will only need the prediction
The fitted model.
List of extra arguments which will always be passed to
Can be changed after construction via
Default is empty list.
Aggregation function, which is used to aggregate the values measured
on test / training sets of the measure to a single value.
Default is test.mean.
Best obtainable value for measure.
Default is -
Inf, depending on
Worst obtainable value for measure.
Inf or -
Inf, depending on
Name of the measure. Default is
Description and additional notes for the measure. Default is “”.
f = function
(id = "my.sse"
, minimize = TRUE
properties = c
), fun = f
#> Name: my.sse
#> Performance measure: my.sse
#> Properties: regr,response
#> Minimize: TRUE
#> Best: -Inf; Worst: Inf
#> Aggregated by: test.mean