Skip to content

fixouttech/fixout

fixout_logo

Algorithmic inspection for trustworthy ML models

PyPi version Python Version PyPI Downloads License Documentation Status

Install

Install the latest version of FixOut from PyPI using

pip install fixout

Getting started

How to start analysing a simple model (let's say you have trained a binary classifier on the German Credit Data):

from fixout.artifact import FixOutArtifact
from fixout.runner import FixOutRunner

fxo = FixOutRunner("Credit Risk Assessment (German Credit)") 

# Indicate the sensitive features
sensitive_features = ["foreignworker","statussex"] 

# Create a FixOut Artifact with your model and data
fxa = FixOutArtifact(model=model,
                      training_data=(X_train,y_train), 
                      testing_data=[(X_test,y_test,"Testing")],
                      features_name=features_name,
                      sensitive_features=sensitive_features,
                      dictionary=dic)

Using a Jupyter Notebook

Then run the inspection with the method runJ

fxo.runJ(fxa, show=False)

You can now check the calculated fairness metrics by using the method fairness.

fxo.fairness()

Fairness metrics

In your quality management code

If you prefer to integrate FixOut into your code, then run the inspection by calling run

fxo.run(fxa, show=True)

In this case, you can access the generated dashboard at http://localhost:5000 ;)

You should be able to see an interface similar to the following

FixOut interface