Fairlearn

Latest version: v0.10.0

Safety actively analyzes 619504 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.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.

0.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 custom`grid` object to a`GridSearch` 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 than`object`, 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`.

0.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](https://fairlearn.org/main/user_guide/assessment.html#plotting-grouped-metrics).
* Added return value (`self`) to `fairlearn.reductions.ExponentiatedGradient`.

0.6.2

* 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.

0.6.1

* Bugfix for `_create_group_metric_set()`. Fixes the list of metrics computed for regression
and adds a set of metrics for 'probability' problems [PR](https://github.com/fairlearn/fairlearn/pull/727)
* Updated 'Credit Card' notebook [PR](https://github.com/fairlearn/fairlearn/pull/713)
* Added some overlooked `MetricFrame` tests [PR](https://github.com/fairlearn/fairlearn/pull/701)
* Various documentation tweaks and enhancements

0.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

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.