v0.16.0#

Note

v0.16.0 is not yet released. This page reflects changes on the current main branch that will eventually be a part of v0.16.0.

New features#

Bug fixes#

  • The mitigation techniques in fairlearn.reductions, fairlearn.postprocessing and fairlearn.preprocessing now raise a ValueError when sensitive_features or control_features contain missing values. Previously, a None value was silently left out of the groups used by the reductions constraints: #1792 by Spilios Dimakopoulos.

  • AdversarialFairnessRegressor and AdversarialFairnessRegressor correctly passthrough target y, respec., sensitive features A passed to .fit if y_transform, respec. sf_transform, is None. They also correctly apply the custom scikit learn transformers the user passes in. #1783 by Tahar Allouche.

  • Fixed TruePositiveRateParity and FalsePositiveRateParity with control_features. Rows with the other label (Y=0 and Y=1 respectively) were turned into events named control=<value>,nan, so the moments also constrained the rate among those rows, and passing a control feature added a false (or true) positive rate parity constraint that the user did not ask for: #1747 by @breken-ai.

  • Bootstrap confidence intervals in plot_metric_frame() are aligned with the plotted groups when a group is absent from all bootstrap samples. Such groups retain their metric values with unavailable intervals: #1787 by Zhe Chen.

  • plot_model_comparison() respects axis_labels=False, preserving existing axis labels instead of replacing them with inferred metric names: #1789 by Zhe Chen.

  • plot_model_comparison() accepts omitted sensitive_features when both metrics can be evaluated without them. Fairness metrics that require sensitive features still reject missing values: #1788 by Zhe Chen.

  • plot_model_comparison() raises a clear ValueError directing users to provide sensitive_features when a derived fairness metric needs group data: #1793.

  • difference() and ratio() with method="to_overall" now set non-scalar metrics to NaN when errors="coerce", and raise the non-scalar error when errors="raise", as with method="between_groups": #1786 by Spilios Dimakopoulos.

  • AdversarialFairnessRegressor no longer exposes the classification-only classes_ attribute. Regression callbacks receive pos_label=None, and incremental fitting preserves fitted state and validates feature counts: #1769 by Emre K..

  • CorrelationRemover preserves its fitted feature count when transform rejects an input with the wrong number of features: #1765 by J Ganesh Kumar Reddy.

  • Fixed solve_linprog so that failures reported by SciPy’s linear programming solver raise a RuntimeError instead of allowing invalid solver output to propagate: #1715 by Roman Lutz.

  • plot_roc_curve_by_group() now raises a ValueError naming the offending feature when a sensitive feature contains missing values, consistent with MetricFrame. Previously, rows with missing sensitive feature values were included in the overall curve but omitted from per-group curves. Remove or replace missing values before plotting: #1729 by Edward Yi.

  • ThresholdOptimizer now raises a ValueError in predict when a sensitive feature value was not seen during fit. Previously every row of such a group was silently predicted as 0: #1743 by Raashish Aggarwal.

Documentation#

Other improvements#

  • Added validation and documentation requiring scalar, non-floating entries for MetricFrame sensitive and control features: #1550 by MariamH.

  • Made BackendEngine in the adversarial module an abstract base class with abstract evaluate, train_step, get_optimizer and get_model methods: #1775 by Venius24.