Predefined measures are stored in mlr_measures.

Format

R6Class object.

Usage

# Construction
m = Measure$new(id, range, minimize, predict_type = "response", task_properties = character(0L), packages = character(0L))
m = MeasureClassif$new(id, range, minimize, predict_type = "response", task_properties = character(0L), packages = character(0L))
m = MeasureRegr$new(id, range, minimize, predict_type = "response", task_properties = character(0L), packages = character(0L))
    # Members
m$id
m$minimize
m$packages
m$predict_type
m$range
m$task_properties
m$task_type
    # Methods
m$aggregate(rr)
m$calculate(e)

Arguments

Details

  • $id (character(1)) stores the identifier of the object.

  • $minimize (logical(1)) indicates if the good values are reached via minimization.

  • $packages (character()) stores the set of required packages.

  • $range (numeric(2)) stores the numeric range of feasible measure values.

  • $task_properties (character()) defines a set of required task properties.

  • $task_type (character()) stores the class names of tasks this measure can operate on.

  • $aggregate() (function(rr)) aggregates multiple performance measures using the aggregate function. Operates on a ResampleResult as returned by resample.

  • $calculate() (function(e)) does the actual work.

  • $new() creates a new object of class Measure.

See also

Examples

mlr_measures$get("classif.mmce")
#> <MeasureClassifMMCE:mmce> #> Packages: Metrics #> Range: [0, 1] #> Minimize: TRUE #> Predict type: response