Welcome to the python binding of the FairCORELS algorithm!
FairCORELS is a modified version of CORELS to learn fair rule list.
sudo apt install libgmp-dev
pip install faircorels
# 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
Note: Python 2 is currently NOT supported on Windows.
pip install faircorels
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)