Description Super classes Public fields Methods See Also
Computes a weighted average over measured scores for each target.
measures that should be maximized are automatically multiplied by '-1' internally during
aggregation and minimize
is therefore set to TRUE
task_type
is set to "multioutput"
.
Possible values for predict_type
are all values from mlr_reflections$learner_predict_types
.
They are currently collected by accessing each Measure
s "predict_type" slot.
Currently limited to only a single 'predict_type' across all measures.
packages
are all packages required from the supplied measures.
The range
is automatically computed based on the specified weights
.
Predefined measures can be found in the mlr3misc::Dictionary mlr3::mlr_measures.
mlr3::Measure
-> mlr3multioutput::MeasureMultioutput
-> MeasureMultioutputWeightedAvg
measures
(list()
)
Access the stored measures.
weights
(numeric()
)
Access the stored weights.
new()
Creates a new instance of this R6 class.
MeasureMultioutputWeightedAvg$new( name = "weightedavg", measures = get_default_measures(), weights = NULL )
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.
weights
(numeric()
)
Named numeric defining weights for respective 'measures'.
Either named with target_names
, mapping targets to weights or
named with task_types
, defining one weight per task_type.
Defaults to 1
for each measure.
A MeasureMultioutput
score_separate()
Returns scores for each measure in self$measures separately.
MeasureMultioutputWeightedAvg$score_separate(prediction, task, ...)
prediction
PredictionMultioutput
Prediction to score.
task
TaskMultioutput
Task to score.
...
(any
)
Currently not used.
A numeric()
vector of scores.
clone()
The objects of this class are cloneable with this method.
MeasureMultioutputWeightedAvg$clone(deep = FALSE)
deep
Whether to make a deep clone.
Example measures:
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.