项目作者: aws

项目描述 :
Fairness Aware Machine Learning. Bias detection and mitigation for datasets and models.
高级语言: Python
项目地址: git://github.com/aws/amazon-sagemaker-clarify.git
创建时间: 2020-04-21T19:08:09Z
项目社区:https://github.com/aws/amazon-sagemaker-clarify

开源协议:Other

下载


Python package
Pypi
Python 3.8+

smclarify

Amazon Sagemaker Clarify

Bias detection and mitigation for datasets and models.

Installation

To install the package from PIP you can simply do:

  1. pip install smclarify

You can see examples on running the Bias metrics on the notebooks in the examples folder.

Terminology

Facet

A facet is column or feature that will be used to measure bias against. A facet can have value(s) that designates that sample as “sensitive“.

Label

The label is a column or feature which is the target for training a machine learning model. The label can have value(s) that designates that sample as having a “positive“ outcome.

Bias measure

A bias measure is a function that returns a bias metric.

Bias metric

A bias metric is a numerical value indicating the level of bias detected as determined by a particular bias measure.

Bias report

A collection of bias metrics for a given dataset or a combination of a dataset and model.

Development

It’s recommended that you setup a virtualenv.

  1. virtualenv -p(which python3) venv
  2. source venv/bin/activate.fish
  3. pip install -e .[test]
  4. cd src/
  5. ../devtool all

For running unit tests, do pytest --pspec. If you are using PyCharm, and cannot see the green run button next to the tests, open Preferences -> Tools -> Python Integrated tools, and set default test runner to pytest.

For Internal contributors, run ../devtool integ_tests after creating virtualenv with the above steps to run the integration tests.