Skip to content

Commit ca90ceb

Browse files
committed
deprecate and remove optimalrulelist (corels)
1 parent 93c1ef9 commit ca90ceb

File tree

7 files changed

+6
-12
lines changed

7 files changed

+6
-12
lines changed

imodels/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
from .discretization.mdlp import MDLPDiscretizer, BRLDiscretizer
1414
from .experimental.bartpy import BART
1515
from .rule_list.bayesian_rule_list.bayesian_rule_list import BayesianRuleListClassifier
16-
from .rule_list.corels_wrapper import OptimalRuleListClassifier
16+
# from .experimental.corels_wrapper import OptimalRuleListClassifier
1717
from .rule_list.greedy_rule_list import GreedyRuleListClassifier
1818
from .rule_list.one_r import OneRClassifier
1919
from .rule_set import boosted_rules
@@ -65,7 +65,6 @@
6565
BayesianRuleSetClassifier,
6666
C45TreeClassifier,
6767
OptimalTreeClassifier,
68-
OptimalRuleListClassifier,
6968
OneRClassifier,
7069
SlipperClassifier,
7170
RuleFitClassifier,

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "imodels"
7-
version = "2.0.1"
7+
version = "2.0.2"
88
description = "Implementations of various interpretable models"
99
readme = "readme.md"
1010
requires-python = ">=3.9"
@@ -62,7 +62,7 @@ dev = [
6262
# Optional algorithm deps mentioned in setup.py comments
6363
[project.optional-dependencies]
6464
optional = [
65-
"cvxpy", # for OptimalRuleListClassifier
65+
"cvxpy", # for slim
6666
"gosdt-deprecated", # for OptimalTreeClassifier
6767
"irf", # for IterativeRandomForestClassifier
6868
"statsmodels", # for bartpy

readme.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ Install with `pip install imodels` (see [here](https://github.com/csinva/imodels
7676
| Boosted rule set | [🗂️](https://csinva.io/imodels/rule_set/boosted_rules.html), [📄](https://www.sciencedirect.com/science/article/pii/S002200009791504X), [🔗](https://github.com/jaimeps/adaboost-implementation) | Sequentially fits a set of rules with Adaboost |
7777
| Slipper rule set | [🗂️](https://csinva.io/imodels/rule_set/slipper.html), [📄](https://www.aaai.org/Papers/AAAI/1999/AAAI99-049.pdf) | Sequentially learns a set of rules with SLIPPER |
7878
| Bayesian rule set | [🗂️](https://csinva.io/imodels/rule_set/brs.html#imodels.rule_set.brs.BayesianRuleSetClassifier), [📄](https://www.jmlr.org/papers/volume18/16-003/16-003.pdf), [🔗](https://github.com/wangtongada/BOA) | Finds concise rule set with Bayesian sampling (slow) |
79-
| Optimal rule list | [🗂️](https://csinva.io/imodels/rule_list/corels_wrapper.html#imodels.rule_list.corels_wrapper.OptimalRuleListClassifier), [📄](https://www.jmlr.org/papers/volume18/17-716/17-716.pdf), [🔗](https://github.com/corels/pycorels) | Fits rule list using global optimization for sparsity (CORELS) |
8079
| Bayesian rule list | [🗂️](https://csinva.io/imodels/rule_list/bayesian_rule_list/bayesian_rule_list.html#imodels.rule_list.bayesian_rule_list.bayesian_rule_list.BayesianRuleListClassifier), [📄](https://projecteuclid.org/journals/annals-of-applied-statistics/volume-9/issue-3/Interpretable-classifiers-using-rules-and-Bayesian-analysis--Building-a/10.1214/15-AOAS848.full), [🔗](https://github.com/tmadl/sklearn-expertsys) | Fits compact rule list distribution with Bayesian sampling (slow) |
8180
| Greedy rule list | [🗂️](https://csinva.io/imodels/rule_list/greedy_rule_list.html), [🔗](https://medium.com/@penggongting/implementing-decision-tree-from-scratch-in-python-c732e7c69aea) | Uses CART to fit a list (only a single path), rather than a tree |
8281
| OneR rule list | [🗂️](https://csinva.io/imodels/rule_list/one_r.html), [📄](https://link.springer.com/article/10.1023/A:1022631118932) | Fits rule list restricted to only one feature |
@@ -165,7 +164,6 @@ Different models support different machine-learning tasks. Current support for d
165164
| Boosted rule set | [BoostedRulesClassifier](https://csinva.io/imodels/rule_set/boosted_rules.html#imodels.rule_set.boosted_rules.BoostedRulesClassifier) | [BoostedRulesRegressor](https://csinva.io/imodels/rule_set/boosted_rules.html#imodels.rule_set.boosted_rules.BoostedRulesRegressor) | |
166165
| SLIPPER rule set | [SlipperClassifier](https://csinva.io/imodels/rule_set/slipper.html#imodels.rule_set.slipper.SlipperClassifier) | | |
167166
| Bayesian rule set | [BayesianRuleSetClassifier](https://csinva.io/imodels/rule_set/brs.html#imodels.rule_set.brs.BayesianRuleSetClassifier) | | Fails for large problems |
168-
| Optimal rule list (CORELS) | [OptimalRuleListClassifier](https://csinva.io/imodels/rule_list/corels_wrapper.html#imodels.rule_list.corels_wrapper.OptimalRuleListClassifier) | | Requires [corels](https://pypi.org/project/corels/), fails for large problems |
169167
| Bayesian rule list | [BayesianRuleListClassifier](https://csinva.io/imodels/rule_list/bayesian_rule_list/bayesian_rule_list.html#imodels.rule_list.bayesian_rule_list.bayesian_rule_list.BayesianRuleListClassifier) | | |
170168
| Greedy rule list | [GreedyRuleListClassifier](https://csinva.io/imodels/rule_list/greedy_rule_list.html#imodels.rule_list.greedy_rule_list.GreedyRuleListClassifier) | | |
171169
| OneR rule list | [OneRClassifier](https://csinva.io/imodels/rule_list/one_r.html#imodels.rule_list.one_r.OneRClassifier) | | |
@@ -282,7 +280,6 @@ MDI+ is a novel feature importance framework, which generalizes the popular mean
282280
<summary>Reference implementations (also linked above)</summary>
283281
The code here heavily derives from the wonderful work of previous projects. We seek to to extract out, unify, and maintain key parts of these projects.
284282
<ul>
285-
<li><a href="https://github.com/corels/pycorels">pycorels</a> - by <a href="https://github.com/fingoldin">@fingoldin</a> and the <a href="https://github.com/corels/corels">original CORELS team</a>
286283
<li><a href="https://github.com/tmadl/sklearn-expertsys">sklearn-expertsys</a> - by <a href="https://github.com/tmadl">@tmadl</a> and <a href="https://github.com/kenben">@kenben</a> based on original code by <a href="http://lethalletham.com/">Ben Letham</a></li>
287284
<li><a href="https://github.com/christophM/rulefit">rulefit</a> - by <a href="https://github.com/christophM">@christophM</a></li>
288285
<li><a href="https://github.com/scikit-learn-contrib/skope-rules">skope-rules</a> - by the <a href="https://github.com/scikit-learn-contrib/skope-rules/blob/master/AUTHORS.rst">skope-rules team</a> (including <a href="https://github.com/ngoix">@ngoix</a>, <a href="https://github.com/floriangardin">@floriangardin</a>, <a href="https://github.com/datajms">@datajms</a>, <a href="">Bibi Ndiaye</a>, <a href="">Ronan Gautier</a>)</li>

tests/classification_binary_inputs_test.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import numpy as np
44

55
from imodels import (
6-
OptimalRuleListClassifier,
76
OptimalTreeClassifier,
87
FPLassoClassifier,
98
FPSkopeClassifier,
@@ -34,7 +33,6 @@ def setup_method(self):
3433
def test_classification_binary(self):
3534
"""Test imodels on basic binary classification task"""
3635
for model_type in [
37-
OptimalRuleListClassifier,
3836
OptimalTreeClassifier,
3937
FPLassoClassifier,
4038
FPSkopeClassifier,
@@ -55,7 +53,7 @@ def test_classification_binary(self):
5553
assert preds.size == self.n, "predict() yields right size"
5654

5755
# test preds_proba()
58-
if model_type not in {OptimalRuleListClassifier, OptimalTreeClassifier}:
56+
if model_type not in {OptimalTreeClassifier}:
5957
preds_proba = m.predict_proba(X)
6058
assert len(preds_proba.shape) == 2, "preds_proba has 2 columns"
6159
assert preds_proba.shape[1] == 2, "preds_proba has 2 columns"

tests/classification_continuous_inputs_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_classification_binary(self):
5656
assert preds.size == self.n, 'predict() yields right size'
5757

5858
# test preds_proba()
59-
if model_type not in {OptimalRuleListClassifier, OptimalTreeClassifier}:
59+
if model_type not in {OptimalTreeClassifier}:
6060
preds_proba = m.predict_proba(X)
6161
assert len(preds_proba.shape) == 2, 'preds_proba has 2 columns'
6262
assert preds_proba.shape[1] == 2, 'preds_proba has 2 columns'

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)