Classwise metrics wrapper¤
Classwise metrics wrapper.
ClasswiseWrapperWithMean
¤
Bases: ClasswiseWrapper
Classwise wrapper with mean.
This metric works together with classification metrics that returns multiple values (one value per class) such that label information can be automatically included in the output. It extends the standard torchmetrics wrapper that does this, adding in an additional mean value (across all classes).
Source code in sparse_autoencoder/metrics/wrappers/classwise.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
|
__init__(metric, component_names=None, prefix=None)
¤
Initialise the classwise wrapper.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
metric |
Metric
|
Metric to wrap. |
required |
component_names |
list[str] | None
|
Component names. |
None
|
prefix |
str | None
|
Prefix for the name (will replace the default of the class name). |
None
|
Source code in sparse_autoencoder/metrics/wrappers/classwise.py
20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
|