Recent Releases of fairlearn

fairlearn - v0.12.0

What's Changed

This release focuses on improving scikit-learn compatibility and fixing several core components. Key highlights include support for scikit-learn 1.6 and various improvements to metrics and documentation.

scikit-learn compatibility

Other improvements

New Contributors

  • @taharallouche made their first contribution in https://github.com/fairlearn/fairlearn/pull/1432
  • @olp-cs made their first contribution in https://github.com/fairlearn/fairlearn/pull/1455
  • @audreyfeldroy made their first contribution in https://github.com/fairlearn/fairlearn/pull/1454

Returning contributors

  • @TamaraAtanasoska
  • @Hrittik20

Full Changelog: https://github.com/fairlearn/fairlearn/compare/v0.11.0...v0.12.0

- Python
Published by TamaraAtanasoska about 1 year ago

fairlearn - v0.11.0

What's Changed

  • Setting up the landing page for version release and prep for v0.11.0 by @alliesaizan in https://github.com/fairlearn/fairlearn/pull/1328
  • ENH Adding Equal Opportunity to fairness metrics by @faildeny in https://github.com/fairlearn/fairlearn/pull/1325
  • DOC Add contributor to intersectionality notebook by @hildeweerts in https://github.com/fairlearn/fairlearn/pull/1330
  • MNT add pyarrow dependency by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1335
  • MNT fix a few pandas warnings by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1336
  • Fixed missing parenthesis in the Equalized odds formula by @lucacorbucci in https://github.com/fairlearn/fairlearn/pull/1337
  • MNT update sparse to sparse_output by @hildeweerts in https://github.com/fairlearn/fairlearn/pull/1345
  • MNT delete trailing note in version guide by @hildeweerts in https://github.com/fairlearn/fairlearn/pull/1346
  • FIX more pandas issues by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1339
  • MNT Build fixes by @riedgar-ms in https://github.com/fairlearn/fairlearn/pull/1351
  • [Doc] Small fixes by @riedgar-ms in https://github.com/fairlearn/fairlearn/pull/1354
  • Release upper bound on scikit-learn by @riedgar-ms in https://github.com/fairlearn/fairlearn/pull/1356
  • DOC Changing the dataset from Adult to Diabetes Hospital in Getting Started by @alliesaizan in https://github.com/fairlearn/fairlearn/pull/1310
  • [Build] Fix issues by @riedgar-ms in https://github.com/fairlearn/fairlearn/pull/1361
  • MNT Fix bug: FloatTransformer output dimension was set incorrectly. by @SeanMcCarren in https://github.com/fairlearn/fairlearn/pull/1333
  • DOC Fix typos in the documentation by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1362
  • MNT Fix failing estimator checks related to the newest sklearn changes by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1369
  • MNT Replace flake8 with ruff for linting by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1365
  • MNT DOC Fix (some) doc build warnings and add/improve documentation by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1363
  • MNT Update the version of black to 24.4.2 by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1370
  • MNT Update .git-blame-ignore-revs with linting changes by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1371
  • DOC Docs improvements, structure and rephrasing by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1372
  • MNT remove lightgbm pin by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1375
  • MNT unpin pytest by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1376
  • DOC change OneHotEncoder.sparse to sparse_output by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1379
  • MNT DOC Clear docs build from all warnings by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1378
  • MNT Address (not always reproducible) docs build warnings by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1382
  • MNT DOC Add example gallery to the API docs by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1389
  • MNT Update code to fit the new numpy2.0.0 API by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1387
  • MNT Remove FutureWarning for the deprecated default usage of ThresholdOptimizer.predict_method by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1388
  • FIX Add classes_ attribute to AdversarialFairnessClassifier by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1384
  • MNT Add caching for branches in the doc and doctest CircleCI builds by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1392
  • FIX all estimator checks related to: checkparametersdefault_constructible by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1393
  • FIX all estimator checks related to: checksupervisedynonan by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1394
  • DOC Update acs_income.rst by @excepto64 in https://github.com/fairlearn/fairlearn/pull/1396
  • FIX failing estimator checks: "checkclassifierstrain" and "checkregressorsnodecisionfunction" by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1397
  • Fix checkfitnon_negative failing estimator check (+3 others) by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1398
  • DOC prepare changelog for release by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1401
  • Fixing failing estimator checks for the AdversarialFairnessRegressor by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1399
  • Bump actions/download-artifact from 3 to 4.1.7 in /.github/workflows by @dependabot in https://github.com/fairlearn/fairlearn/pull/1406
  • Add test for fetch_acs_income by @EdAbati in https://github.com/fairlearn/fairlearn/pull/1403
  • Remove unused dataframe creation by @EdAbati in https://github.com/fairlearn/fairlearn/pull/1404
  • [Doc] Tweak text about community calls by @riedgar-ms in https://github.com/fairlearn/fairlearn/pull/1407
  • MNT Fix errors caused by three estimator checks by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1405
  • MNT Fix all remaining estimator checks (except pickle related errors) by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1410
  • DOC move adversarial examples by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1380
  • MNT fix version constraint for torch by @adrinjalali in https://github.com/fairlearn/fairlearn/pull/1418
  • DOC Add Tamara to the website by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1420
  • ENH added agg argument to equalized odds difference and ratio to support "average odds" by @IanEisenberg in https://github.com/fairlearn/fairlearn/pull/960
  • DOC Add jupyterlite button to the examples by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1422
  • Update maintainers by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1424
  • Update value in init as preparation for v0.11.0 release by @TamaraAtanasoska in https://github.com/fairlearn/fairlearn/pull/1426

New Contributors

  • @faildeny made their first contribution in https://github.com/fairlearn/fairlearn/pull/1325
  • @lucacorbucci made their first contribution in https://github.com/fairlearn/fairlearn/pull/1337
  • @excepto64 made their first contribution in https://github.com/fairlearn/fairlearn/pull/1396
  • @EdAbati made their first contribution in https://github.com/fairlearn/fairlearn/pull/1403
  • @IanEisenberg made their first contribution in https://github.com/fairlearn/fairlearn/pull/960

Full Changelog: https://github.com/fairlearn/fairlearn/compare/v0.10.0...v0.11.0

- Python
Published by TamaraAtanasoska over 1 year ago

fairlearn - v0.10.0

- Python
Published by alliesaizan about 2 years ago

fairlearn - v0.9.0

  • Added Credit Loan Decisions example notebook.
  • Bugfix for fairlearn.metrics.selection_rate to handle TypeError when input is scalar.
  • Added support for pickling classes in fairlearn.reductions.
  • Bugfix for sklearn.preprocessing.OneHotEncoder in fairlearn.adversarial to ensure compatibility with scikit-learn 1.2.
  • Set default value of parser of sklearn.datasets.fetch_openml in fairlearn.datasets to liac-arff to match behavior before scikit-learn 1.2.
  • Replace calculations in fairlearn.reductions by matrix multiplication which can lead to substantial speed-ups for fairlearn.reductions.ExponentiatedGradient for simple estimators like logistic regression.
  • Added as_frame (with default True) argument to fairlearn.datasets.fetch_diabetes_hospital.
  • Changed as_frame default to True for all remaining datasets.
  • Changed fairlearn.metrics.MetricFrame so that all results (including aggregations) are computed in the constructor and then cached.
  • Bugfix for fairlearn.adversarial that changes the loss function NLLLoss to CrossEntropyLoss.
  • Various documentation tweaks and enhancements, including restructuring of the user guide and breaking out information in the API reference to separate pages.

- Python
Published by hildeweerts over 2 years ago

fairlearn - v0.8.0

  • Relaxed checks made on X in _validate_and_reformat_input() since that is the concern of the underlying estimator and not Fairlearn.
  • Add support for Python 3.9 and 3.10, remove support for Python 3.6 and 3.7
  • Added error handling in MetricFrame. Methods group_max,group_min, difference and ratio now accept errors as a parameter, which could either be raise or coerce.
  • Fixed a bug whereby passing a customgrid object to aGridSearch reduction would result in a KeyError if the column names were not ordered integers.
  • fairlearn.preprocessing.CorrelationRemover now exposes n_features_in_ and feature_names_in_.
  • Added the ACSIncome dataset and corresponding documentation.
  • Add sphinxcontrib-bibtex extension to manage citations in documentation using bibtex.
  • Added support for explicitly specifying optimization objective in fairlearn.reductions.ExponentiatedGradient. Added support for cost sensitive classification in fairlearn.reductions.ErrorRate.
  • Internal performance improvements for fairlearn.metrics.MetricFrame. Some results may now have a more appropriate type thanobject, but otherwise the only visible difference should be a substantial speed increase.
  • Added fairlearn.metrics.plot_model_comparison to create scatter plots for comparing multiple models along two metrics.
  • Added adversarial mitigation approaches fairlearn.adversarial.AdversarialFairnessClassifier and fairlearn.adversarial.AdversarialFairnessRegressor.

- Python
Published by riedgar-ms over 3 years ago

fairlearn - v0.7.0

  • Added new count() metric, so that the number of data points in each group is noted when using MetricFrame
  • Changed MetricFrame constructor API, so metric argument is now metrics and all positional arguments are now keyword arguments. Previous call format still works (until v0.10.0), but issues a deprecation warning.
  • postprocessing.ThresholdOptimizer now accepts predict_method as a parameter which allows users to define which estimator method should be used to get the prediction values: "predict_proba" and "decision_function" for soft values and "predict" for hard values from classifiers.
  • Removed fairlearn.widgets module including the FairlearnDashboard. Instead, the fairlearn.metrics.MetricFrame supports plotting as explained in the corresponding user guide section.
  • Added return value (self) to fairlearn.reductions.ExponentiatedGradient.

- Python
Published by romanlutz over 4 years ago

fairlearn -

  • Bugfix for _merge_columns() when using multiple sensitive features with long names. This previously caused groups to get merged if the concatenation of their string representations was identical until the cutoff limit.

- Python
Published by romanlutz almost 5 years ago

fairlearn -

  • Bugfix for _create_group_metric_set(). Fixes the list of metrics computed for regression and adds a set of metrics for 'probability' problems PR
  • Updated 'Credit Card' notebook PR
  • Added some overlooked MetricFrame tests PR
  • Various documentation tweaks and enhancements

- Python
Published by romanlutz almost 5 years ago

fairlearn - v0.6.0

  • Add CorrelationRemover preprocessing technique. This removes correlations between sensitive and non-sensitive features while retaining as much information as possible
  • Add control_features to the classification moments. These allow for data stratification, with fairness constraints enforced within each stratum, but not between strata
  • Update make_derived_metric() to use MetricFrame
  • Assorted small documentation fixes

- Python
Published by riedgar-ms about 5 years ago

fairlearn - v0.5.0

  • Adjust classes to abide by naming conventions for attributes.
  • Change ExponentiatedGradient signature by renaming argument T to max_iter, eta_mul to eta0, and by adding run_linprog_step.
  • API refactoring to separate out different uses of eps within ExponentiatedGradient. It is now solely responsible for setting the L1 norm bound in the optimization (which controls the excess constraint violation beyond what is allowed by the constraints object). The other usage of eps as the right-hand side of constraints is now captured directly in the moment classes as follows:
    • Classification moments: ConditionalSelectionRate renamed to UtilityParity and its subclasses have new arguments on the constructor:
    • difference_bound - for difference-based constraints such as demographic parity difference
    • ratio_bound_slack - for ratio-based constraints such as demographic parity ratio
    • Additionally, there's a ratio_bound argument which represents the argument previously called ratio.
    • Regression moments: ConditionalLossMoment and its subclasses have a new argument upper_bound with the same purpose for newly enabled regression scenarios on ExponentiatedGradient. For a comprehensive overview of available constraints refer to the new user guide on fairness constraints for reductions methods.
  • Renamed several constraints to create a uniform naming convention according to the accepted metric harmonization proposal:
    • ErrorRateRatio renamed to ErrorRateParity, and TruePositiveRateDifference renamed to TruePositiveRateParity since the desired pattern is <metric name>Parity with the exception of EqualizedOdds and DemographicParity.
    • ConditionalSelectionRate renamed to UtilityParity.
    • GroupLossMoment renamed to BoundedGroupLoss in order to have a descriptive name and for consistency with the paper. Similarly, AverageLossMoment renamed to MeanLoss. For a comprehensive overview of available constraints refer to the new user guide on fairness constraints for reductions methods.
  • Added TrueNegativeRateParity to provide the opposite constraint of TruePositiveRateParity to be used with reductions techniques.
  • Add new constraints and objectives in ThresholdOptimizer
  • Add class InterpolatedThresholder to represent the fitted ThresholdOptimizer
  • Add fairlearn.datasets module.
  • Change the method to make copies of the estimator in ExponentiatedGradient from pickle.dump to sklearn.clone.
  • Add an argument sample_weight_name to GridSearch and ExponentiatedGradient to control how sample_weight is supplied to estimator.fit.
  • Large changes to the metrics API. A new class MetricFrame has been introduced, and make_group_summary() removed (along with related functions). Please see the documentation and examples for more information.

- Python
Published by riedgar-ms over 5 years ago

fairlearn - Release v0.4.6

  • Handle case where reductions relabeling results in a single class
  • Refactor metrics:
    • Remove GroupMetricResult type in favor of a Bunch.
    • Rename and slightly update signatures:
    • metric_by_group changed to group_summary
    • make_group_metric changed to make_metric_group_summary
    • Add group summary transformers {difference,ratio,group_min,group_max}_from_group_summary.
    • Add factory make_derived_metric.
  • Add new metrics:
    • base metrics {true,false}_{positive,negative}_rate
    • group summary metrics <metric>_group_summary
    • derived metrics <metric>_{difference,ratio,group_min,group_max}
    • disparity metrics {demographic_parity,equalized_odds}_{difference,ratio}
  • Remove metrics:
    • fallout_rate in favor of false_positive_rate
    • miss_rate in favor of false_negative_rate
    • specificity_score in favor of true_negative_rate
  • Change from public to private:
    • mean_{over,under}prediction and {balanced_,}root_mean_squared_error changed to the versions with a leading underscore
  • Fix warning due to changing default dtype when creating an empty pandas.Series.
  • Enable GridSearch for more than two sensitive features values.
  • Add new disparity constraints for reductions methods as moments in fairlearn.reductions including:
    • TruePositiveRateDifference
    • ratio options for all existing constraints in addition to the default, i.e., difference between groups w.r.t. the relevant metric.
  • Make ExponentiatedGradient require 0-1 labels for classification problems, pending a better solution for Issue 339.

- Python
Published by riedgar-ms almost 6 years ago

fairlearn - Release v0.4.5

  • Changes to ThresholdOptimizer:
    • Separate plotting for ThresholdOptimizer into its own plotting function.
    • ThresholdOptimizer now performs validations during fit, and not during __init__. It also stores the fitted given estimator in the estimator_ attribute.
    • ThresholdOptmizer is now a scikit-learn meta-estimator, and accepts an estimator through the estimator parameter. To use a pre-fitted estimator, pass prefit=True.
  • Made _create_group_metric_set_() private by prepending with _. Also changed the arguments, so that this routine requires dictionaries for the predictions and sensitive features. This is a breaking change.
  • Remove Reduction base class for reductions methods and replace it with sklearn.base.BaseEstimator and sklearn.base.MetaEstimatorMixin.
  • Remove ExponentiatedGradientResult and GridSearchResult in favor of storing the values and objects resulting from fitting the meta-estimator directly in the ExponentiatedGradient and GridSearch objects, respectively.
  • Fix regression in input validation that dropped metadata from X if it is provided as a pandas.DataFrame.

- Python
Published by riedgar-ms almost 6 years ago

fairlearn - Release v0.4.4

  • Remove GroupMetricSet in favour of a create_group_metric_set method
  • Add basic support for multiple sensitive features
  • Refactor ThresholdOptimizer to use mixins from scikit-learn

- Python
Published by riedgar-ms about 6 years ago

fairlearn - Release v0.4.3

Various updates for GroupMetricResult and GroupMetricSet to help with AzureML integration

- Python
Published by riedgar-ms about 6 years ago

fairlearn - Release v0.4.1

- Python
Published by rihorn2 about 6 years ago

fairlearn - Release v0.4.0

Includes the dashboard as well as the core fairlearn functionality

- Python
Published by riedgar-ms about 6 years ago