equipy


Nameequipy JSON
Version 0.0.6a0.dev0 PyPI version JSON
download
home_pageNone
SummaryEquipy is a tool for fast, online fairness calibration
upload_time2024-04-19 12:17:27
maintainerNone
docs_urlNone
authorAgathe F, Suzie G, Francois H, Philipp R, Arthur C
requires_pythonNone
licenseNone
keywords fairness wasserstein
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. -*- mode: rst -*-

|Build yes|

.. |Build yes| image:: https://img.shields.io/badge/build-passing-<COLOR>.svg
   :target: https://github.com/equilibration/equipy/actions/workflows/build-package.yml


**EquiPy** is a Python package implementing sequential fairness on the predicted outputs of Machine Learning models, when dealing with multiple sensitive attributes. This post-processing method progressively achieve fairness accross a set of sensitive features by leveraging multi-marginal Wasserstein barycenters, which extends the standard notion of Strong Demographic Parity to the case with multiple sensitive characteristics. This approach seamlessly extends
to approximate fairness, enveloping a framework accommodating the trade-off between performance and unfairness.

The project was started in 2023 by François Hu, Philipp Ratz, Suzie Grondin, Agathe Fernandes Machado and Arthur Charpentier, following the release of this paper "A Sequentially Fair Mechanism for Multiple Sensitive Attributes" (https://arxiv.org/pdf/2309.06627.pdf), written by François Hu, Philipp Ratz and Arthur Charpentier.

For additional details, you can visit the dedicated **EquiPy** website https://equilibration.github.io/equipy/.

Installation
------------

Dependencies
~~~~~~~~~~~~

EquiPy requires:

- Numpy (>= 1.17.3)
- Scipy (>= 1.5.0)
- Scikit-learn (== 1.3.0)
- Matplotlib (== 3.7.2)
- Pandas (== 2.0.3)
- Statsmodels (== 0.14.0)
- Seaborn (== 0.12.2)
- POT (==0.9.1)

User installation
~~~~~~~~~~~~~~~~~


To install EquiPy, use ``pip``::

    pip install equipy

Project Tree Structure
----------------------

The following is the tree structure of the project:

.. code-block:: plaintext

    equipy/
        ├── equipy/
        |   ├── __init__.py
        |   ├── fairness/
        |   │   ├── __init__.py
        |   |   ├── _base.py
        |   |   ├── _wasserstein.py
        |   ├── graphs/
        |   │   ├── __init__.py
        |   │   ├── _arrow_plot.py
        |   │   ├── _density_plot.py
        |   │   ├── _waterfall_plot.py
        |   ├── metrics/
        |   │   ├── __init__.py
        |   │   ├── _fairness_metrics.py
        |   │   ├── _performance_metrics.py
        |   ├── utils/
        |   │   ├── __init__.py
        |   │   ├── checkers.py
        |   │   ├── permutations/
        |   │   |   ├── __init__.py
        |   │   |   ├── _compute_permutations.py
        |   │   |   ├── metrics/
        |   │   |   |   ├── __init__.py
        |   │   |   |   ├── _fairness_permutations.py
        |   │   |   |   ├── _performance_permutations.py
        ├── .gitignore
        ├── LICENSE
        ├── README.rst
        ├── requirements.txt
        ├── setup.py
        └── tests.py


Visualization
-------------

This package contains the module **graphs** which allows visualization of the resulting sequential fairness applied to a response variable.

|pic1| |pic2|

(Risk, Unfairness) phase diagrams that show the sequential fairness approach for (left pane) two sensitive features;
(right pane) three sensitive features.

.. |pic1| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/arrow_plot_2_sa.png
   :width: 45%

.. |pic2| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/arrow_plot_3_sa.png
   :width: 45%

|pic3| |pic4|

A sequential unfairness evaluation, for (left pane) exact fairness in $A_{3}$ ; (right pane) approximate fairness in $A_{3}$ with $\\epsilon = (\\epsilon_{1}, \\epsilon_{2}, \\epsilon_{3}) = (0.2, 0.5, 0.75)$. Hashed color corresponds to exact fairness.

.. |pic3| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/waterfall_plot_exact.png
   :width: 45%

.. |pic4| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/waterfall_plot_approx.png
   :width: 45%

Help and Support
----------------

Communication
~~~~~~~~~~~~~

If you have any inquiries, feel free to contact us:

- François Hu : hu.faugon@gmail.com
- Suzie Grondin : suzie.grondin@gmail.com
- Philipp Ratz : ratz.philipp@courrier.uqam.ca
- Agathe Fernandes Machado : fernandes_machado.agathe@courrier.uqam.ca
- Arthur Charpentier : arthur.charpentier@gmail.com






            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "equipy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "fairness, wasserstein",
    "author": "Agathe F, Suzie G, Francois H, Philipp R, Arthur C",
    "author_email": "nocontact@email.com",
    "download_url": "https://files.pythonhosted.org/packages/bd/5f/71a5d1ce8f4048c8b3cb5d1c51055231674c9c1464cc1e6e723488f22253/equipy-0.0.6a0.dev0.tar.gz",
    "platform": null,
    "description": ".. -*- mode: rst -*-\n\n|Build yes|\n\n.. |Build yes| image:: https://img.shields.io/badge/build-passing-<COLOR>.svg\n   :target: https://github.com/equilibration/equipy/actions/workflows/build-package.yml\n\n\n**EquiPy** is a Python package implementing sequential fairness on the predicted outputs of Machine Learning models, when dealing with multiple sensitive attributes. This post-processing method progressively achieve fairness accross a set of sensitive features by leveraging multi-marginal Wasserstein barycenters, which extends the standard notion of Strong Demographic Parity to the case with multiple sensitive characteristics. This approach seamlessly extends\nto approximate fairness, enveloping a framework accommodating the trade-off between performance and unfairness.\n\nThe project was started in 2023 by Fran\u00e7ois Hu, Philipp Ratz, Suzie Grondin, Agathe Fernandes Machado and Arthur Charpentier, following the release of this paper \"A Sequentially Fair Mechanism for Multiple Sensitive Attributes\" (https://arxiv.org/pdf/2309.06627.pdf), written by Fran\u00e7ois Hu, Philipp Ratz and Arthur Charpentier.\n\nFor additional details, you can visit the dedicated **EquiPy** website https://equilibration.github.io/equipy/.\n\nInstallation\n------------\n\nDependencies\n~~~~~~~~~~~~\n\nEquiPy requires:\n\n- Numpy (>= 1.17.3)\n- Scipy (>= 1.5.0)\n- Scikit-learn (== 1.3.0)\n- Matplotlib (== 3.7.2)\n- Pandas (== 2.0.3)\n- Statsmodels (== 0.14.0)\n- Seaborn (== 0.12.2)\n- POT (==0.9.1)\n\nUser installation\n~~~~~~~~~~~~~~~~~\n\n\nTo install EquiPy, use ``pip``::\n\n    pip install equipy\n\nProject Tree Structure\n----------------------\n\nThe following is the tree structure of the project:\n\n.. code-block:: plaintext\n\n    equipy/\n        \u251c\u2500\u2500 equipy/\n        |   \u251c\u2500\u2500 __init__.py\n        |   \u251c\u2500\u2500 fairness/\n        |   \u2502   \u251c\u2500\u2500 __init__.py\n        |   |   \u251c\u2500\u2500 _base.py\n        |   |   \u251c\u2500\u2500 _wasserstein.py\n        |   \u251c\u2500\u2500 graphs/\n        |   \u2502   \u251c\u2500\u2500 __init__.py\n        |   \u2502   \u251c\u2500\u2500 _arrow_plot.py\n        |   \u2502   \u251c\u2500\u2500 _density_plot.py\n        |   \u2502   \u251c\u2500\u2500 _waterfall_plot.py\n        |   \u251c\u2500\u2500 metrics/\n        |   \u2502   \u251c\u2500\u2500 __init__.py\n        |   \u2502   \u251c\u2500\u2500 _fairness_metrics.py\n        |   \u2502   \u251c\u2500\u2500 _performance_metrics.py\n        |   \u251c\u2500\u2500 utils/\n        |   \u2502   \u251c\u2500\u2500 __init__.py\n        |   \u2502   \u251c\u2500\u2500 checkers.py\n        |   \u2502   \u251c\u2500\u2500 permutations/\n        |   \u2502   |   \u251c\u2500\u2500 __init__.py\n        |   \u2502   |   \u251c\u2500\u2500 _compute_permutations.py\n        |   \u2502   |   \u251c\u2500\u2500 metrics/\n        |   \u2502   |   |   \u251c\u2500\u2500 __init__.py\n        |   \u2502   |   |   \u251c\u2500\u2500 _fairness_permutations.py\n        |   \u2502   |   |   \u251c\u2500\u2500 _performance_permutations.py\n        \u251c\u2500\u2500 .gitignore\n        \u251c\u2500\u2500 LICENSE\n        \u251c\u2500\u2500 README.rst\n        \u251c\u2500\u2500 requirements.txt\n        \u251c\u2500\u2500 setup.py\n        \u2514\u2500\u2500 tests.py\n\n\nVisualization\n-------------\n\nThis package contains the module **graphs** which allows visualization of the resulting sequential fairness applied to a response variable.\n\n|pic1| |pic2|\n\n(Risk, Unfairness) phase diagrams that show the sequential fairness approach for (left pane) two sensitive features;\n(right pane) three sensitive features.\n\n.. |pic1| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/arrow_plot_2_sa.png\n   :width: 45%\n\n.. |pic2| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/arrow_plot_3_sa.png\n   :width: 45%\n\n|pic3| |pic4|\n\nA sequential unfairness evaluation, for (left pane) exact fairness in $A_{3}$ ; (right pane) approximate fairness in $A_{3}$ with $\\\\epsilon = (\\\\epsilon_{1}, \\\\epsilon_{2}, \\\\epsilon_{3}) = (0.2, 0.5, 0.75)$. Hashed color corresponds to exact fairness.\n\n.. |pic3| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/waterfall_plot_exact.png\n   :width: 45%\n\n.. |pic4| image:: https://raw.githubusercontent.com/equilibration/equipy/feature-corrections/examples/images/waterfall_plot_approx.png\n   :width: 45%\n\nHelp and Support\n----------------\n\nCommunication\n~~~~~~~~~~~~~\n\nIf you have any inquiries, feel free to contact us:\n\n- Fran\u00e7ois Hu : hu.faugon@gmail.com\n- Suzie Grondin : suzie.grondin@gmail.com\n- Philipp Ratz : ratz.philipp@courrier.uqam.ca\n- Agathe Fernandes Machado : fernandes_machado.agathe@courrier.uqam.ca\n- Arthur Charpentier : arthur.charpentier@gmail.com\n\n\n\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Equipy is a tool for fast, online fairness calibration",
    "version": "0.0.6a0.dev0",
    "project_urls": null,
    "split_keywords": [
        "fairness",
        " wasserstein"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2feeb2c0869e98abfdb0bc0c10dab34610166daa090a0d36c177ff876f30dd5f",
                "md5": "7f9fe55be268ae95ef7cc7e4c2b944eb",
                "sha256": "29d02003a39bd0efcc31e54baf398c78e45dacf2946f48f77a729c82f49a49f0"
            },
            "downloads": -1,
            "filename": "equipy-0.0.6a0.dev0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7f9fe55be268ae95ef7cc7e4c2b944eb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 28426,
            "upload_time": "2024-04-19T12:17:26",
            "upload_time_iso_8601": "2024-04-19T12:17:26.119462Z",
            "url": "https://files.pythonhosted.org/packages/2f/ee/b2c0869e98abfdb0bc0c10dab34610166daa090a0d36c177ff876f30dd5f/equipy-0.0.6a0.dev0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd5f71a5d1ce8f4048c8b3cb5d1c51055231674c9c1464cc1e6e723488f22253",
                "md5": "3760779cace88e6342361800a0a9d776",
                "sha256": "3500a5e751f6d49cf730609db596038fcaaed7a6ced667ec68c51b36dc79e140"
            },
            "downloads": -1,
            "filename": "equipy-0.0.6a0.dev0.tar.gz",
            "has_sig": false,
            "md5_digest": "3760779cace88e6342361800a0a9d776",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 22346,
            "upload_time": "2024-04-19T12:17:27",
            "upload_time_iso_8601": "2024-04-19T12:17:27.194289Z",
            "url": "https://files.pythonhosted.org/packages/bd/5f/71a5d1ce8f4048c8b3cb5d1c51055231674c9c1464cc1e6e723488f22253/equipy-0.0.6a0.dev0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-19 12:17:27",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "equipy"
}
        
Elapsed time: 0.24257s