fatf.utils.metrics.subgroup_metrics.performance_per_subgroup_indexed¶
- 
fatf.utils.metrics.subgroup_metrics.performance_per_subgroup_indexed(indices_per_bin: List[numpy.ndarray], ground_truth: numpy.ndarray, predictions: numpy.ndarray, *args, label_index: int = 0, labels: Optional[List[Union[float, str]]] = None, metric: Optional[str] = None, metric_function: Optional[Callable[[numpy.ndarray], float]] = None, **kwargs) → List[float][source]¶ Computes a chosen metric per sub-population for index-based grouping.
This function combines
fatf.utils.metrics.tools.confusion_matrix_per_subgroup_indexedfunction together withfatf.utils.metrics.subgroup_metrics.apply_metric(when usingmetricparameter) andfatf.utils.metrics.subgroup_metrics.apply_metric_function(when usingmetric_functionparameter) functions. For the description of parameters, errors and exceptions please see the documentation of these functions.Note
The
metric_functionparameter takes the precedence over themetricparameter is both are provided.- Returns
 - population_metricsList[numbers]
 A list with the value of the selected metric for every sub-population.
- bin_namesList[strings]
 The name of every sub-population (binning results) defined by the feature ranges for a numerical feature and feature value sets for a categorical feature.