Quickstart

Installation

pip install pyfomo

Dependencies

The requirements for fomo are listed in environment.yml.

Note on pymoo If you are working in linux and get a warning about pymoo, is recommended that you manually install it from the github repo rather than pip:

git clone https://github.com/anyoptimization/pymoo
cd pymoo
make compile
pip install .

Development

To install a development version, do the following:

git clone https://github.com/cavalab/fomo
cd fomo
pip install . 

Basic Usage

Here is an example of training a fair classifier on the adult income prediction dataset.


from fomo import FomoClassifier
from pmlb import pmlb
dataset = pmlb.fetch_data('adult')
X = dataset.drop('target',axis=1)
y = dataset['target']
groups = ['race','sex']
est = FomoClassifier()
est.fit(X,y, protected_features=groups)