{"id":22376,"library":"skope-rules","title":"skope-rules","description":"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.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/scikit-learn-contrib/skope-rules","tags":["interpretable-ml","rule-learning","scikit-learn-contrib","decision-rules"],"install":[{"cmd":"pip install skope-rules","lang":"bash","label":"pip install"}],"dependencies":[],"imports":[{"note":"Correct import uses 'skrules' not 'skope_rules'","wrong":"from skope_rules import SkopeRules","symbol":"SkopeRules","correct":"from skrules import SkopeRules"}],"quickstart":{"code":"from skrules import SkopeRules\nfrom sklearn.datasets import load_iris\nfrom sklearn.model_selection import train_test_split\n\nX, y = load_iris(return_X_y=True)\nX_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)\n\nclf = SkopeRules(max_depth_duplication=2, n_estimators=10, random_state=42)\nclf.fit(X_train, y_train)\nscores = clf.score(X_test, y_test)\nprint(scores)","lang":"python","description":"Basic usage: train SkopeRules classifier on Iris dataset."},"warnings":[{"fix":"Use 'from skrules import SkopeRules'.","message":"The import path uses 'skrules' not 'skope_rules'. Using 'from skope_rules import SkopeRules' will raise ImportError.","severity":"gotcha","affected_versions":"all"},{"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()","message":"SkopeRules.score() returns a list of scores (one per class) for multi-class problems, not a single accuracy. This differs from sklearn convention.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'max_depth' if available, else 'max_depth_duplication'.","message":"Parameter 'max_depth_duplication' is deprecated in favor of 'max_depth' in future versions? Not officially deprecated yet, but be cautious with parameter names.","severity":"deprecated","affected_versions":">=1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run 'from skrules import SkopeRules' instead.","cause":"Incorrect import path; module is installed as 'skrules'.","error":"ImportError: No module named 'skope_rules'"},{"fix":"Use clf.predict() for class labels, or check the documentation for alternatives.","cause":"skope-rules does not provide predict_proba by default.","error":"AttributeError: 'SkopeRules' object has no attribute 'predict_proba'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}