Skip to content

Algorithm for learning fair rule lists

License

Notifications You must be signed in to change notification settings

aivodji/fairCORELS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Faircorels

Welcome to the python binding of the FairCORELS algorithm!

Overview

FairCORELS is a modified version of CORELS to learn fair rule list.

Installation

Ubuntu

sudo apt install libgmp-dev
pip install faircorels

Mac

# Install g++ and gmp
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install g++ gmp

pip install faircorels

Windows

Note: Python 2 is currently NOT supported on Windows.

pip install faircorels

Examples

Large dataset, loaded from this file

from faircorels import *

# Load the dataset
X, y = load_from_csv("data/compas.csv")

# Create the model, with 10000 as the maximum number of iterations 
c = CorelsClassifier(n_iter=10000)

# Fit, and score the model on the training set
a = c.fit(X, y).score(X, y)

# Print the model's accuracy on the training set
print(a)

About

Algorithm for learning fair rule lists

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 78.4%
  • Python 21.1%
  • Makefile 0.5%