fatf.utils.metrics.subgroup_metrics.performance_per_subgroup_indexed(indices_per_bin, ground_truth, predictions, *args, label_index=0, labels=None, metric=None, metric_function=None, **kwargs)[source]

Computes a chosen metric per sub-population for index-based grouping.

This function combines fatf.utils.metrics.tools.confusion_matrix_per_subgroup_indexed function together with fatf.utils.metrics.subgroup_metrics.apply_metric (when using metric parameter) and fatf.utils.metrics.subgroup_metrics.apply_metric_function (when using metric_function parameter) functions. For the description of parameters, errors and exceptions please see the documentation of these functions.


The metric_function parameter takes the precedence over the metric parameter is both are provided.


A list with the value of the selected metric for every sub-population.


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.