# Decision Rule¶

See the backing repository for Skope Rules here.

## Summary¶

Decision rules are logical expressions of the form IF ... THEN .... Interpret’s implementation uses a wrapped variant of skope-rules[2], which is a weighted combination of rules extracted from a tree ensemble using L1-regularized optimization over the weights. Rule systems, like single decision trees, can give interpretability at the cost of model performance. These discovered decision rules are often integrated into expert-driven rule-based systems.

## How it Works¶

The creators of skope-rules have a lucid synopsis of what decision rules are here.

Christoph Molnar’s “Interpretable Machine Learning” e-book [1] has an excellent overview on decision rules that can be found here.

For implementation specific details, see the skope-rules GitHub repository here.

## Code Example¶

The following code will train an skope-rules classifier for the breast cancer dataset. The visualizations provided will be for both global and local explanations.

from interpret import set_visualize_provider
from interpret.provider import InlineProvider
set_visualize_provider(InlineProvider())

from sklearn.datasets import load_breast_cancer
from sklearn.model_selection import train_test_split

from interpret.glassbox import DecisionListClassifier
from interpret import show

seed = 1