holisticai.bias.plots.disparate_impact_curve#

holisticai.bias.plots.disparate_impact_curve(group_a, group_b, y_pred, x_axis='score', ax=None, size=None, title=None)[source]#

Disparate Impact curve

Description

This function plots the Disparate Impact versus threshold curve.

Parameters

group_aarray-like

Group membership vector (binary)

group_barray-like

Group membership vector (binary)

y_predarray-like

Predictions vector (regression)

x_axis (optional)‘score’ or ‘quantile’

Indicates whether the x axis is the scores or data quantiles

ax (optional)matplotlib axes

Pre-existing axes for the plot

size (optional)(int, int)

Size of the figure

title (optional)str

Title of the figure

Returns

matplotlib ax