MeasureMultioutputCustomAggr: Multioutput custom aggregation Measure

Description Super classes Public fields Methods See Also

Description

Computes an aggregation over measured scores for each target.

Predefined measures can be found in the mlr3misc::Dictionary mlr3::mlr_measures.

Super classes

mlr3::Measure -> mlr3multioutput::MeasureMultioutput -> MeasureMultioutputCustomAggr

Public fields

measures

(list())
Access the stored measures.

aggfun

(function())
Set or get the aggregation function.

Methods

Public methods

Inherited methods

Method new()

Creates a new instance of this R6 class.

Usage
MeasureMultioutputCustomAggr$new(
  name = "custom_aggregation",
  measures = get_default_measures(),
  aggfun = min,
  range = c(-Inf, Inf)
)
Arguments
name

(character(1))
Name of the measure. Default: "weightedavg".

measures

(list)
Named list of measures to be applied to each "target".
Either named with target_names, mapping targets to measures or named with task_types, defining one measure per task_type. Defaults to mlr_reflections$default_measures for each task type.

Returns

A MeasureMultioutput


Method score_separate()

Returns scores for each measure in self$measures separately.

Usage
MeasureMultioutputCustomAggr$score_separate(prediction, task, ...)
Arguments
prediction

PredictionMultioutput
Prediction to score.

task

TaskMultioutput
Task to score.

...

(any)
Currently not used.

Returns

A numeric() vector of scores.


Method clone()

The objects of this class are cloneable with this method.

Usage
MeasureMultioutputCustomAggr$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Example measures:


mlr-org/mlr3multioutput documentation built on Nov. 22, 2020, 1:17 p.m.