skope-rules
Machine Learning with Interpretable Rules
What it is and what it does
Skope-rules is a machine learning module built on top of scikit-learn that learns interpretable logical rules for binary classification by extracting and deduplicating rules from tree ensembles. It aims to find rules that detect instances of a target class with high precision, offering a middle ground between the transparency of a single decision tree and the predictive power of a random forest.
The package extracts rules from tree ensembles, removes near-duplicates based on support similarity, and filters them by user-specified precision and recall thresholds. Rules can be used both for explanation (examining the logical conditions) and for prediction via methods that rank instances by the precision of the rules that match them.
Use it for:
- Extract human-readable classification rules from a trained tree ensemble to understand which feature combinations define a target class.
- Build a high-precision detector for rare or critical events where false positives are costly and interpretability is required.
- Score new instances by the precision of the rules that match them, balancing accuracy with explainability.
- Generate a small set of actionable business rules from historical data for manual review and deployment in rule engines.
- Compare rule-based predictions with tree or forest predictions to validate that simplified rules capture ensemble logic.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Skope-rules learns interpretable logical rules from data to classify instances with high precision, balancing the simplicity of decision trees with the power of random forests.
Yes, if you need interpretable rules for binary classification and can accept dormant maintenance. The package is stable, has low install friction, and carries no known vulnerabilities. However, verify compatibility with your current numpy, scikit-learn, scipy, and pandas versions before relying on it in production.
Install
skope-rules on PyPI
pip
pip install skope-rulesuv
uv add skope-rulespoetry
poetry add skope-rulesInstalling skope-rules
Before you install
Low friction: pure Python wheel with four common scientific dependencies (numpy, scikit-learn, scipy, pandas). However, the package is dormant—last release was 2020-01-25, over four years ago, with no recent commits beyond 2024-01-31.
License in practice
BSD 3 clause is permissive; you can use, modify, and distribute skope-rules freely in commercial and private projects with minimal restrictions, provided you retain the license notice.
Quickstart
pip install skope-rules
from skope_rules import SkopeRules
clf = SkopeRules(max_depth_duplication=2, n_estimators=30, precision_min=0.3, recall_min=0.1)
clf.fit(X, y)
rules = clf.rules_[0:3]
Verify before relying
- Whether the package remains compatible with current versions of numpy, scikit-learn, scipy, and pandas given its dormant status.
- Whether Python 3.10+ is supported; the description mentions Python 2.7 and 3.5 but provides no upper bound.
- Active community support or maintenance plans, given the gap since the last release in 2020-01-25.
Package facts
| License | BSD 3 clause (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — numpy, scikit-learn, scipy, pandas |
| Maintenance | dormant — 2,393 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 86,577/month — #13,851 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: skope_rules-1.0.1-py3-none-any.whl
Keywords: learning with rules, interpretable machine learning
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
interpret-coreTrains interpretable machine learning models…
unclear · top 5,000 on PyPI
interpretInterpretML provides interpretable machine…
unclear · top 15,000 on PyPI
ydfYDF trains, evaluates, and interprets decision…
permissive · top 15,000 on PyPI
mlxtendMlxtend provides ensemble methods, feature…
permissive · top 5,000 on PyPI
rulesrules provides object-level permission checking…
permissive · top 15,000 on PyPI
dtreevizdtreeviz renders decision trees from…
permissive · top 15,000 on PyPI
limeLime explains individual predictions from any…
permissive · top 15,000 on PyPI
properscoringProperscoring provides strictly proper scoring…
permissive · top 15,000 on PyPI
treeinterpreterDecomposes scikit-learn decision tree and…
permissive · top 15,000 on PyPI
pySigmaParses and converts Sigma detection rules into…
copyleft · top 15,000 on PyPI