SubgroupDifference#
- class ignite.metrics.fairness.SubgroupDifference(base_metric, groups, output_transform=<function _SubgroupBase.<lambda>>, device=device(type='cpu'))[source]#
A wrapper metric that computes the maximum difference between any two subgroups’ metric values.
This metric is useful for measuring performance disparities across demographic segments.
- Parameters:
New in version 0.5.4.
Methods
Computes the maximum disparity between any two subgroups.
- compute()[source]#
Computes the maximum disparity between any two subgroups.
- Returns:
The maximum difference (max - min) in metric value across all non-empty subgroups.
- Raises:
NotComputableError – if less than two unique subgroups have been processed.
- Return type: