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.postprocessingandfairlearn.preprocessingnow raise aValueErrorwhensensitive_featuresorcontrol_featurescontain missing values. Previously, aNonevalue was silently left out of the groups used by the reductions constraints: #1792 by Spilios Dimakopoulos.AdversarialFairnessRegressorandAdversarialFairnessRegressorcorrectly passthrough targety, respec., sensitive featuresApassed to.fitify_transform, respec.sf_transform, isNone. They also correctly apply the custom scikit learn transformers the user passes in. #1783 by Tahar Allouche.Fixed
TruePositiveRateParityandFalsePositiveRateParitywithcontrol_features. Rows with the other label (Y=0andY=1respectively) were turned into events namedcontrol=<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()respectsaxis_labels=False, preserving existing axis labels instead of replacing them with inferred metric names: #1789 by Zhe Chen.plot_model_comparison()accepts omittedsensitive_featureswhen 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 clearValueErrordirecting users to providesensitive_featureswhen a derived fairness metric needs group data: #1793.difference()andratio()withmethod="to_overall"now set non-scalar metrics to NaN whenerrors="coerce", and raise the non-scalar error whenerrors="raise", as withmethod="between_groups": #1786 by Spilios Dimakopoulos.AdversarialFairnessRegressorno longer exposes the classification-onlyclasses_attribute. Regression callbacks receivepos_label=None, and incremental fitting preserves fitted state and validates feature counts: #1769 by Emre K..CorrelationRemoverpreserves its fitted feature count whentransformrejects an input with the wrong number of features: #1765 by J Ganesh Kumar Reddy.Fixed
solve_linprogso that failures reported by SciPy’s linear programming solver raise aRuntimeErrorinstead of allowing invalid solver output to propagate: #1715 by Roman Lutz.plot_roc_curve_by_group()now raises aValueErrornaming the offending feature when a sensitive feature contains missing values, consistent withMetricFrame. 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.ThresholdOptimizernow raises aValueErrorinpredictwhen a sensitive feature value was not seen duringfit. Previously every row of such a group was silently predicted as 0: #1743 by Raashish Aggarwal.
Documentation#
Corrected the default
pos_labeldescriptions fortrue_positive_rate(),true_negative_rate(),false_positive_rate(), andfalse_negative_rate(): #1763 by @Ganesh1729-ui.Added
versionaddeddirectives to the reductions moment classes (Moment,DemographicParity,EqualizedOdds,UtilityParity,TruePositiveRateParity,FalsePositiveRateParity,ErrorRateParity,ErrorRate,BoundedGroupLoss, and the loss helpers), documenting when each entered the public API (v0.3.0, v0.5.0, and v0.13.0 forMeanLoss): #1767 by Peace Amhanesi.Added a
versionchangeddirective to theAdversarialFairnessClassifierAPI reference, documenting the v0.11.0scikit-learncompatibility overhaul and the newclasses_attribute: #1767 by Peace Amhanesi.
Other improvements#
Added validation and documentation requiring scalar, non-floating entries for
MetricFramesensitive and control features: #1550 by MariamH.Made
BackendEnginein the adversarial module an abstract base class with abstractevaluate,train_step,get_optimizerandget_modelmethods: #1775 by Venius24.