Skip to main content

The Word Embedding Fairness Evaluation Framework

Project description

ReadTheDocs

CircleCI

WEFE: The Word Embedding Fairness Evaluation Framework

WEFE is a package focused on providing an easy and well-designed framework for measuring word embedding bias.

It provides metrics, a framework for creating queries, and a standard interface for executing these queries using a metric and a pre-trained Word Embedding model. In addition, it has multiple tools that allow you to run several queries on several different embedding models, graph them, calculate their associated rankings per test, among others.

Although it is only in its early stages of development, it is expected that with time it will become more robust, that more metrics will be implemented and that it will extend to other types of bias measurement in NLP.

The official documentation can be found at this link.

Installation

There are two different ways to install WEFE:

To install the package with pip

pip install wefe
  • With conda:

To install the package with conda:

conda install wefe

Requirements

These package will be installed along with the package, in case these have not already been installed:

  1. numpy

  2. scikit-learn

  3. scipy

  4. pandas

  5. gensim

  6. plotly

  7. patool

Contributing

You can download the code executing

git clone https://github.com/dccuchile/wefe

To contribute, visit the corresponding section in the documentation:

Contributing <https://wefe.readthedocs.io/en/latest/contribute.html/>

Testing

All unit tests are in the wefe/test folder. It uses pytest as a framework to run them. You can run all tests, first install pytest and pytest-cov:

pip install -U pytest
pip install pytest-cov

To run the test, execute:

pytest wefe

To check the coverage, run:

py.test wefe --cov-report xml:cov.xml --cov wefe

And then:

coverage report -m

Build the documentation

The documentation is created using sphinx. It can be found in the doc folder at the root of the project. Here, the API is described as well as quick start and use cases. To compile the documentation, run it:

cd doc
make html

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wefe-0.1.2.tar.gz (322.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wefe-0.1.2-py3-none-any.whl (337.3 kB view details)

Uploaded Python 3

File details

Details for the file wefe-0.1.2.tar.gz.

File metadata

  • Download URL: wefe-0.1.2.tar.gz
  • Upload date:
  • Size: 322.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for wefe-0.1.2.tar.gz
Algorithm Hash digest
SHA256 adb0dcfb99f18a7a2b1aa5932b395803b956240818cacaa27eeb61f5520e12c3
MD5 046a01e0d61d6815b1dd60be80dfd336
BLAKE2b-256 cbf4b65dace5bbbccd3374eae3565a637703a39304a310a9fc3add4f5a08f2be

See more details on using hashes here.

File details

Details for the file wefe-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: wefe-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 337.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.2.0.post20200210 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.6

File hashes

Hashes for wefe-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 baba7643ab9c89ce6501c19b8fca1fe70ba7e97f76dcdb1026d016be1bdfc436
MD5 024f3450ccaa075bb0253bcd67ea0b6d
BLAKE2b-256 f882cbe87bd9ae93a707db0a43cc707b377f0af06bee315b05f52373ac9774de

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page