lime
Local Interpretable Model-Agnostic Explanations for machine learning classifiers
Decision gist · record as of 2026-08-14
Yes, with conditions. Lime is well-established and permissively licensed, but it has been dormant since June 2020 and may have compatibility gaps with current ML frameworks. Install it if you need model-agnostic explanations for existing classifiers and can verify it works with your specific dependencies; avoid it if you require active maintenance or support for the latest framework versions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python >= 3.5; classifier must implement a function that takes raw text or numpy array and returns class probabilities.
- High install friction due to no runtime dependencies listed; package is dormant (last release 2020-06-26, 2240 days ago) but the repository remains active with recent commits and substantial community engagement (12167 stars).
License · maintenance · safety
BSD (permissive) — BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most deployment contexts.
last release 2020-06-26 (2240 days) · last repo commit 2024-07-25 · 12,167 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 417,603 downloads/mo, #6,814 on PyPI
Alternatives
Verify before relying
pip install lime
from lime.lime_text import LimeTextExplainer
explainer = LimeTextExplainer(class_names=['class_a', 'class_b'])
explanation = explainer.explain_instance(text_instance, classifier_fn)- Whether high install friction reflects missing optional dependencies or build requirements not captured in the fact sheet.
- Current compatibility with modern scikit-learn, PyTorch, Keras versions given the 2020 release date.
- Whether the package is maintained or accepting contributions despite dormant status.
What it is and what it does
Lime is a model-agnostic explanation tool that helps you understand what machine learning classifiers are doing by generating local interpretable approximations of their behavior. It works by perturbing instances around a specific prediction, weighting samples by proximity, and fitting a sparse linear model that approximates the classifier's decision boundary locally. This reveals which features most influenced a particular prediction.
The package supports text classifiers, tabular data (numerical or categorical), and image classifiers. It requires only that your classifier outputs class probabilities; built-in support for scikit-learn is included. Explanations are generated as interactive HTML visualizations or matplotlib plots, making them suitable for notebooks and reports. The approach is based on the 2016 paper on local interpretable model-agnostic explanations.
Use it for
- Debug why a text classifier predicted a specific sentiment or category for a document.
- Understand which features in tabular data drove a model's prediction for a particular row.
- Visualize which regions of an image influenced a classifier's prediction (e.g., cat vs. dog).
- Generate explanations for regulatory compliance when model decisions affect users.
- Identify data quality issues or unexpected feature interactions by examining local approximations.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, with conditions.
Lime is well-established and permissively licensed, but it has been dormant since June 2020 and may have compatibility gaps with current ML frameworks. Install it if you need model-agnostic explanations for existing classifiers and can verify it works with your specific dependencies; avoid it if you require active maintenance or support for the latest framework versions.
Install
lime on PyPI
Before you install
High install friction due to no runtime dependencies listed; package is dormant (last release 2020-06-26, 2240 days ago) but the repository remains active with recent commits and substantial community engagement (12167 stars).
Requires Python >= 3.5; classifier must implement a function that takes raw text or numpy array and returns class probabilities.
License in practice
BSD permissive license allows commercial and private use with minimal restrictions, making it suitable for most deployment contexts.
Quickstart
pip install lime
from lime.lime_text import LimeTextExplainer
explainer = LimeTextExplainer(class_names=['class_a', 'class_b'])
explanation = explainer.explain_instance(text_instance, classifier_fn)
Verify before relying
- Whether high install friction reflects missing optional dependencies or build requirements not captured in the fact sheet.
- Current compatibility with modern scikit-learn, PyTorch, Keras versions given the 2020 release date.
- Whether the package is maintained or accepting contributions despite dormant status.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.5 |
| Install friction | High. Source build required |
| Runtime dependencies | None |
| Maintenance | Dormant 2,240 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 417,603 / month, #6,814 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
Evidence: lime-0.2.0.1.tar.gz
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “interpret classifier predictions”
- limeLime explains individual predictions from any black-box machine…
- eli5Explains predictions and weights of machine learning classifiers from…
- interpretInterpretML provides interpretable machine learning models and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.
Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.
Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.
Install it if you work with Hugging Face Hub models or datasets.
LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.
hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.
Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.
Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.
Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.
See also eli5 · interpret-core · shap · interpret · skope-rules · aplr · treeinterpreter · captum · betacal · trove-classifiers