Registry / ai-ml / skope-rules

skope-rules

JSON →
library1.0.1pypypiunverified

skope-rules is a Python library for interpretable machine learning. It extracts decision rules from tree-based models to provide transparent predictions. Last version: 1.0.1 (released 2023). Low release cadence.

pip install skope-rules
INSTALL
IMPORT
SIG · SKOPE-RULES
S
skope-rules
ai-mlpythonv1.0.1
Install
14.0s avg
Import
—
Disk
353MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 14.0s · import 0.000s · 341MB
353MB installed
● package 353MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

SkopeRules
✓ from skrules import SkopeRules
✗ from skrules import SkopeRules

Basic usage: train SkopeRules classifier on Iris dataset.

from skrules import SkopeRules from sklearn.datasets import load_iris from sklearn.model_selection import train_test_split X, y = load_iris(return_X_y=True) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) clf = SkopeRules(max_depth_duplication=2, n_estimators=10, random_state=42) clf.fit(X_train, y_train) scores = clf.score(X_test, y_test) print(scores)
Debug
Known issues
gotchaThe import path uses 'skrules' not 'skope_rules'. Using 'from skope_rules import SkopeRules' will raise ImportError.
fix
Use 'from skrules import SkopeRules'.
affects: all
gotchaSkopeRules.score() returns a list of scores (one per class) for multi-class problems, not a single accuracy. This differs from sklearn convention.
fix
Use clf.score(X_test, y_test) which returns per-class scores. For overall accuracy, compute manually: (clf.predict(X_test) == y_test).mean()
affects: all
deprecatedParameter 'max_depth_duplication' is deprecated in favor of 'max_depth' in future versions? Not officially deprecated yet, but be cautious with parameter names.
fix
Use 'max_depth' if available, else 'max_depth_duplication'.
affects: >=1.0.0
Upgrade
Version history
1.0.1latest on PyPI · released Jan 25, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
16
OpenAI (training)
1
Resources
skope-rules — pip install skope-rules · libregistry