fairlearn.postprocessing.plot_threshold_optimizer#

fairlearn.postprocessing.plot_threshold_optimizer(threshold_optimizer, ax=None, show_plot=True)[source]#

Plot the chosen solution of the threshold optimizer.

For ThresholdOptimizer objects that have their constraint set to demographic_parity this will result in a selection/error curve plot. For ThresholdOptimizer objects that have their constraint set to equalized_odds this will result in a ROC curve plot.

Parameters:
threshold_optimizerThresholdOptimizer

The ThresholdOptimizer instance for which the results should be illustrated.

axmatplotlib.axes.Axes, default = None

A custom matplotlib.axes.Axes object to use for the plots.

show_plotbool, default = True

Whether or not the generated plot should be shown, default True