plot_performance_disparities#

er_evaluation.plots.plot_performance_disparities(prediction, reference, weights, protected_feature, estimator=<function pairwise_f_estimator>, estimator_name='Pairwise F-score', max_subgroups=10)[source]#

Plot largest performance disparities among predefined subgroups.

Parameters:
  • prediction (Series) – Predicted clustering.

  • reference (Series) – Reference clustering.

  • weights (str or Series) – Weights for sampled clusters, or one of “uniform” or “cluster_size”.

  • protected_feature (Series) – Series index by reference cluster IDs and with values corresponding to group assignment.

  • estimator – Function to use for performance estimation. Defaults to pairwise_f_design_estimate.

  • estimator_name (str, optional) – Name of the estimator to use in the plot labels. Defaults to “Pairwise F-score”.

  • max_subgroups (int, optional) – Number of subgroups to display. Defaults to 10.

Returns:

plotly Figure