Package smile.deep.metric
Enum Class Averaging
- All Implemented Interfaces:
Serializable
,Comparable<Averaging>
,Constable
The averaging strategy to aggregate binary performance metrics across
multi-classes.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionMacro-averaging calculates each class's performance metric (e.g., precision, recall) and then takes the arithmetic mean across all classes.Micro-averaging aggregates the counts of true positives, false positives, and false negatives across all classes and then calculates the performance metric based on the total counts.Weighted macro for imbalanced classes. -
Method Summary
-
Enum Constant Details
-
Macro
Macro-averaging calculates each class's performance metric (e.g., precision, recall) and then takes the arithmetic mean across all classes. So, the macro-average gives equal weight to each class, regardless of the number of instances. -
Micro
Micro-averaging aggregates the counts of true positives, false positives, and false negatives across all classes and then calculates the performance metric based on the total counts. So, the micro-average gives equal weight to each instance, regardless of the class label and the number of samples in the class. Note that micro-average precision and micro-average recall are equal to accuracy. -
Weighted
Weighted macro for imbalanced classes. Note that weighted recall is equal to accuracy.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-