Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

Interpretability with

diversified-by-design rules;
skope-rules, a python package
[email protected], [email protected], [email protected]
with the participation of n. goix, f. gardin, j-m. schertzer

Motivation Skope-Rules: an interpretable rule-based classifier


Complex Machine Learning models some- Skope-Rules, the proposed interpretable However, our approach mainly differs in the
times achieve high performance, but lead model, aims at learning decision rules for way that decision rules are chosen: semantic
to opaque decisions. Due to regulation or "scoping" a target class, i.e. detecting in- deduplication based on variables com-
severe consequences on errors, more inter- stances of this class with high precision. posing each rule as opposed to L1-based
pretability is often necessary [1]. Here, The problem of generating such rules has been feature selection (RuleFit).
we present Skope-Rules, a rule-based inter- widely considered, see e.g. RuleFit [2], Slip-
pretable model. per [3], LRI [4], MLRules [5].

Methodology Implementation
• Bagging estimator training: Multi- • Semantic deduplication: A similarity Skope-rules is a
ple decision tree classifiers, and poten- filtering is applied to maintain enough Python package
tially regressors (if a sample weight is diversity among the rules. The similar- hosted on Scikit-
applied), are trained. Note that each ity measure of two rules is based on the Learn-Contrib
node in this bagging estimator can be number of their common terms. A term under the 3-Clause
seen as a rule. is a variable name combined with a com- BSD license.
• Performance filtering: Out-of-bag parison operator (< or >).
precision and recall thresholds are ap- Code and documentation are available here:
plied to select best rules. https://github.com/
scikit-learn-contrib/skope-rules
Installation: pip install skope-rules

Usage of Skope-Rules
Skope-Rules is suited for different applica-
tions and can be used:

As a global interpretable model:


This is the natural use of Skope-Rules, for a
binary classification task. Rules isolate the 1s
from 0s.
Example
• Line 4-5: Model is trained through As a cluster describer:
standard scikit-learn API. In a clustering task, Skope-Rules is very use-
• Line 8: Predictions are made and can ful to describe each segment. Each cluster can
be used to evaluate performances of be post-processed and approximated with a
rules combined. set of interpretable rules.
• Line 11: The computed rules are stored
with their out-of-bag standalone perfor- As a distribution queue describer:
mances (see below). Skope-Rules is also relevant to describe how
any subsample differs from a population.
More precisely, it can be used to describe sub-
samples defined by highest (or lowest) values
of a given variable.
In particular, Skope-Rules has revealed to be
effective at understanding highest (or lowest)
prediction scores of an other complex classi-
fier.

References Perspectives
[1] Doshi-Velez et al. Accountability of AI Under the Law: The Role of Explanation, 2017 • Mathematical formalization
[2] Friedman and Popescu. Predictive learning via rule ensembles,Technical Report, 2005
• Improvement of the prediction API
[3] Cohen and Singer. A simple, fast, and effective rule learner, National Conference on AI, 1999
when combining rules
[4] Weiss and Indurkhyar. Lightweight rule induction, ICML, 2000
[5] Dembczynski, Kotlowski and Slowinski. Maximum Likelihood Rule Ensembles, ICML, 2008 • Develop paralleled implementations

You might also like