Averaging
Aliases#
The following lists all implemented metric averaging methods, by alias. These can be used when composing metrics using metric syntax strings.
| Alias | Metric | sklearn |
|---|---|---|
| 'binary' | SelectPositiveClass |
binary |
| 'geom' | GeometricMean |
|
| 'geometric' | GeometricMean |
|
| 'harm' | HarmonicMean |
|
| 'harmonic' | HarmonicMean |
|
| 'macro' | MacroAverage |
macro |
| 'macro_average' | MacroAverage |
macro |
| 'mean' | MacroAverage |
macro |
| 'micro' | WeightedAverage |
weighted |
| 'micro_average' | WeightedAverage |
weighted |
| 'select' | SelectPositiveClass |
binary |
| 'select_positive' | SelectPositiveClass |
binary |
| 'weighted' | WeightedAverage |
weighted |
| 'weighted_average' | WeightedAverage |
weighted |
Abstract Base Class#
Averaging
#
The abstract base class for metric averaging.
Properties should be implemented as class attributes in derived metrics.
The compute_average method needs to be implemented
Attributes#
dependencies
abstractmethod
instance-attribute
property
#
All metrics upon which this metric averaging method depends.
Constructed from the union of all Metric and AveragingMethod dependencies.
Used to generate a computation schedule, such that no metric is calculated before its dependencies.
The dependencies must match the compute_average signature.
This is checked during class definition.
sklearn_equivalent
abstractmethod
instance-attribute
property
#
The sklearn equivalent function, if applicable.
aliases
abstractmethod
instance-attribute
property
#
A list of all valid aliases for this metric averaging method.
Can be used when creating metric syntax strings.
Functions#
compute_average
abstractmethod
#
Computes the average across experiment classes.