{"id":23892,"library":"interpret-community","title":"Interpret Community","description":"Microsoft Interpret Extensions SDK for Python – provides a unified API for model interpretability including SHAP, LIME, and surrogate explainers. Current version: 0.32.0. Release cadence: irregular, ~2-4 per year.","status":"active","version":"0.32.0","language":"python","source_language":"en","source_url":"https://github.com/interpretml/interpret-community","tags":["interpretability","explainability","SHAP","LIME","machine-learning"],"install":[{"cmd":"pip install interpret-community","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"Required for core interpretation logic","package":"interpret-core","optional":false},{"reason":"Used for SHAP-based explainers","package":"shap","optional":true},{"reason":"Wrapper models for scikit-learn, etc.","package":"ml-wrappers","optional":true},{"reason":"Data input/output handling","package":"pandas","optional":false}],"imports":[{"note":"Old import path without 'ext' - missing subpackage","wrong":"from interpret.blackbox import TabularExplainer","symbol":"TabularExplainer","correct":"from interpret.ext.blackbox import TabularExplainer"},{"note":"MimicExplainer lives in interpret.ext.blackbox, not interpret.community","wrong":"from interpret.community import MimicExplainer","symbol":"MimicExplainer","correct":"from interpret.ext.blackbox import MimicExplainer"}],"quickstart":{"code":"import pandas as pd\nfrom sklearn.datasets import load_iris\nfrom sklearn.ensemble import RandomForestClassifier\nfrom interpret.ext.blackbox import TabularExplainer\n\niris = load_iris()\nX = pd.DataFrame(iris.data, columns=iris.feature_names)\ny = iris.target\nmodel = RandomForestClassifier().fit(X, y)\nexplainer = TabularExplainer(model, X, features=iris.feature_names)\nglobal_explanation = explainer.explain_global()\nprint(global_explanation.feature_importance())","lang":"python","description":"Basic usage: train a model, create a TabularExplainer, and get global feature importance."},"warnings":[{"fix":"Use Python 3.7 or higher.","message":"In v0.29.0, Python 3.6 support was dropped. Upgrade to Python 3.7+.","severity":"breaking","affected_versions":">=0.29.0"},{"fix":"Use get_surrogate_model_replication_measure() instead of _get_surrogate_model_replication_measure().","message":"In v0.25.0, the function _get_surrogate_model_replication_measure() was made public as get_surrogate_model_replication_measure(). Private underscore prefix removed.","severity":"breaking","affected_versions":">=0.25.0"},{"fix":"Use 'from interpret.ext.blackbox import ...'.","message":"The old import path from interpret.blackbox is deprecated. Use interpret.ext.blackbox instead.","severity":"deprecated","affected_versions":">=0.30.0"},{"fix":"Wrap input data in a pandas DataFrame with column names when using TabularExplainer.","message":"Passing numpy arrays without feature names may cause errors in explainers that expect pandas DataFrames.","severity":"gotcha","affected_versions":"all"},{"fix":"Instantiate the surrogate model first: from sklearn.tree import DecisionTreeRegressor; MimicExplainer(..., augment_data=True, surrogate_model=DecisionTreeRegressor()).","message":"When using MimicExplainer, the surrogate model (e.g., DecisionTree) must be passed as a model object, not a string.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Upgrade interpret-community: pip install --upgrade interpret-community","cause":"Old package versions before 'ext' subpackage was added (or incomplete installation).","error":"ModuleNotFoundError: No module named 'interpret.ext'"},{"fix":"Upgrade to v0.20+ and use explain_global() instead of explain().","cause":"Using an older version where the API was different (pre-v0.20).","error":"AttributeError: 'TabularExplainer' object has no attribute 'explain_global'"},{"fix":"Reshape or wrap in a list: explainer.explain_local([X_row]) instead of explainer.explain_local(X_row).","cause":"Passing a single row (1D) to an explainer that expects 2D input (e.g., DataFrame).","error":"ValueError: Expected 2D array, got 1D array instead"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}