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
- Fairlearn is now compatible with scikit-learn 1.6: #1451 by Tamara Atanasoska.
- The fairlearn.preprocessing.CorrelationRemover estimator is now fully scikit-learn compatible: #1452 by Tamara Atanasoska.
Other improvements
- Fixed MetricFrame bootstrapping with missing sensitive feature values: #1450 by Tahar Allouche.
- Added weighted objective’s curve to ThresholdOptimizer’s plot: #1445 by Tahar Allouche.
- Corrected CorrelationRemover’s mathematical formulation in documentation: #1438 by Tahar Allouche.
- Fixed CorrelationRemover’s default constructor and added input validation: #1439 by Tahar Allouche.
- Updating the documentation infrastructure for ease of use: #1421 by Tamara Atanasoska.
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_incomeby @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
Added bootstrapping to :class:
MetricFrame, along with a new section in the user guideAdded intersectionality in mental health care example notebook.
Added user guide for :class:
fairlearn.postprocessing.ThresholdOptimizer
- Python
Published by alliesaizan about 2 years ago
fairlearn - v0.9.0
- Added Credit Loan Decisions example notebook.
- Bugfix for
fairlearn.metrics.selection_rateto handleTypeErrorwhen input is scalar. - Added support for pickling classes in
fairlearn.reductions. - Bugfix for
sklearn.preprocessing.OneHotEncoderinfairlearn.adversarialto ensure compatibility with scikit-learn 1.2. - Set default value of
parserofsklearn.datasets.fetch_openmlinfairlearn.datasetstoliac-arffto match behavior before scikit-learn 1.2. - Replace calculations in
fairlearn.reductionsby matrix multiplication which can lead to substantial speed-ups forfairlearn.reductions.ExponentiatedGradientfor simple estimators like logistic regression. - Added
as_frame(with defaultTrue) argument tofairlearn.datasets.fetch_diabetes_hospital. - Changed
as_framedefault toTruefor all remaining datasets. - Changed
fairlearn.metrics.MetricFrameso that all results (including aggregations) are computed in the constructor and then cached. - Bugfix for
fairlearn.adversarialthat changes the loss functionNLLLosstoCrossEntropyLoss. - 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
Xin_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. Methodsgroup_max,group_min,differenceandrationow accepterrorsas a parameter, which could either beraiseorcoerce. - Fixed a bug whereby passing a custom
gridobject to aGridSearchreduction would result in aKeyErrorif the column names were not ordered integers. fairlearn.preprocessing.CorrelationRemovernow exposesn_features_in_andfeature_names_in_.- Added the ACSIncome dataset and corresponding documentation.
- Add
sphinxcontrib-bibtexextension to manage citations in documentation using bibtex. - Added support for explicitly specifying optimization objective in
fairlearn.reductions.ExponentiatedGradient. Added support for cost sensitive classification infairlearn.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_comparisonto create scatter plots for comparing multiple models along two metrics. - Added adversarial mitigation approaches
fairlearn.adversarial.AdversarialFairnessClassifierandfairlearn.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 usingMetricFrame - Changed
MetricFrameconstructor API, sometricargument is nowmetricsand all positional arguments are now keyword arguments. Previous call format still works (until v0.10.0), but issues a deprecation warning. postprocessing.ThresholdOptimizernow acceptspredict_methodas 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.widgetsmodule including theFairlearnDashboard. Instead, thefairlearn.metrics.MetricFramesupports plotting as explained in the corresponding user guide section. - Added return value (
self) tofairlearn.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
MetricFrametests PR - Various documentation tweaks and enhancements
- Python
Published by romanlutz almost 5 years ago
fairlearn - v0.6.0
- Add
CorrelationRemoverpreprocessing technique. This removes correlations between sensitive and non-sensitive features while retaining as much information as possible - Add
control_featuresto the classification moments. These allow for data stratification, with fairness constraints enforced within each stratum, but not between strata - Update
make_derived_metric()to useMetricFrame - 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
ExponentiatedGradientsignature by renaming argumentTtomax_iter,eta_multoeta0, and by addingrun_linprog_step. - API refactoring to separate out different uses of
epswithinExponentiatedGradient. 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 theconstraintsobject). The other usage ofepsas the right-hand side of constraints is now captured directly in the moment classes as follows:- Classification moments:
ConditionalSelectionRaterenamed toUtilityParityand its subclasses have new arguments on the constructor: difference_bound- for difference-based constraints such as demographic parity differenceratio_bound_slack- for ratio-based constraints such as demographic parity ratio- Additionally, there's a
ratio_boundargument which represents the argument previously calledratio. - Regression moments:
ConditionalLossMomentand its subclasses have a new argumentupper_boundwith the same purpose for newly enabled regression scenarios onExponentiatedGradient. For a comprehensive overview of available constraints refer to the new user guide on fairness constraints for reductions methods.
- Classification moments:
- Renamed several constraints to create a uniform naming convention according
to the accepted metric harmonization proposal:
ErrorRateRatiorenamed toErrorRateParity, andTruePositiveRateDifferencerenamed toTruePositiveRateParitysince the desired pattern is<metric name>Paritywith the exception ofEqualizedOddsandDemographicParity.ConditionalSelectionRaterenamed toUtilityParity.GroupLossMomentrenamed toBoundedGroupLossin order to have a descriptive name and for consistency with the paper. Similarly,AverageLossMomentrenamed toMeanLoss. For a comprehensive overview of available constraints refer to the new user guide on fairness constraints for reductions methods.
- Added
TrueNegativeRateParityto provide the opposite constraint ofTruePositiveRateParityto be used with reductions techniques. - Add new constraints and objectives in
ThresholdOptimizer - Add class
InterpolatedThresholderto represent the fittedThresholdOptimizer - Add
fairlearn.datasetsmodule. - Change the method to make copies of the estimator in
ExponentiatedGradientfrompickle.dumptosklearn.clone. - Add an argument
sample_weight_nametoGridSearchandExponentiatedGradientto control howsample_weightis supplied toestimator.fit. - Large changes to the metrics API. A new class
MetricFramehas been introduced, andmake_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
GroupMetricResulttype in favor of aBunch. - Rename and slightly update signatures:
metric_by_groupchanged togroup_summarymake_group_metricchanged tomake_metric_group_summary- Add group summary transformers
{difference,ratio,group_min,group_max}_from_group_summary. - Add factory
make_derived_metric.
- Remove
- 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}
- base metrics
- Remove metrics:
fallout_ratein favor offalse_positive_ratemiss_ratein favor offalse_negative_ratespecificity_scorein favor oftrue_negative_rate
- Change from public to private:
mean_{over,under}predictionand{balanced_,}root_mean_squared_errorchanged to the versions with a leading underscore
- Fix warning due to changing default
dtypewhen creating an emptypandas.Series. - Enable
GridSearchfor more than two sensitive features values. - Add new disparity constraints for reductions methods as moments in
fairlearn.reductionsincluding:TruePositiveRateDifference- ratio options for all existing constraints in addition to the default, i.e., difference between groups w.r.t. the relevant metric.
- Make
ExponentiatedGradientrequire 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
ThresholdOptimizerinto its own plotting function. ThresholdOptimizernow performs validations duringfit, and not during__init__. It also stores the fitted given estimator in theestimator_attribute.ThresholdOptmizeris now a scikit-learn meta-estimator, and accepts an estimator through theestimatorparameter. To use a pre-fitted estimator, passprefit=True.
- Separate plotting for
- 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
Reductionbase class for reductions methods and replace it withsklearn.base.BaseEstimatorandsklearn.base.MetaEstimatorMixin. - Remove
ExponentiatedGradientResultandGridSearchResultin favor of storing the values and objects resulting from fitting the meta-estimator directly in theExponentiatedGradientandGridSearchobjects, respectively. - Fix regression in input validation that dropped metadata from
Xif it is provided as apandas.DataFrame.
- Python
Published by riedgar-ms almost 6 years ago
fairlearn - Release v0.4.4
- Remove
GroupMetricSetin favour of acreate_group_metric_setmethod - Add basic support for multiple sensitive features
- Refactor
ThresholdOptimizerto 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.0
Includes the dashboard as well as the core fairlearn functionality
- Python
Published by riedgar-ms about 6 years ago