Public home of pycorels, the python binding to CORELS
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


Welcome to the python binding of the Certifiably Optimal RulE ListS (CORELS) algorithm! For information on CORELS, please visit our website.


Corels exists on PyPI, and can be downloaded with pip install corels

To install from this repo, simply run python install from the corels directory.


All functionality is exposed via a class called CorelsClassifier. This class has the following methods:

(constructor): Provide data-independent parameters for the classifier
fit(X, y): Generate a rulelist from the samples X and the labels y
predict(X): Predict classifications for the samples X
score(X, y): Score the accuracy of the model on the test samples X with labels y

We also provide a helper function called load_from_csv, which loads a csv file with binary data into sample and label datasets (X and y).


from corels import *

X, y = load_from_csv("data/compas.csv")
c = CorelsClassifier(n_iter=10000)

a =, y).score(X, y)