imbalanced-learn
Toolbox for imbalanced dataset in machine learning
Decision gist · record as of 2026-08-14
Yes. Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make this a safe choice. It solves a real, common problem in machine learning with a mature, well-integrated API. Install if you work with imbalanced classification datasets.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation with a pure-Python wheel.
- Active maintenance with recent releases; last commit 2026-06-29.
- Depends on well-established scientific Python stack (numpy, scipy, scikit-learn, joblib).
License · maintenance · safety
permissive license (permissive) — MIT license (permissive) allows use in commercial and private projects with minimal restrictions.
last release 2026-06-07 (68 days) · last repo commit 2026-06-29 · 7,117 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 16,822,922 downloads/mo, #1,138 on PyPI
Alternatives
Verify before relying
pip install imbalanced-learn
import imbalanced_learn
from sklearn.datasets import make_classification
X, y = make_classification()
# Use imbalanced-learn resampling techniques in preprocessing pipeline- Whether optional dependencies (Pandas, TensorFlow, Keras) are required for core functionality or only for specific features
- Performance characteristics when handling very large datasets
- Specific resampling algorithms included and their names
What it is and what it does
imbalanced-learn is a scikit-learn-compatible Python toolbox for handling datasets where one class significantly outnumbers others—a common problem in real-world machine learning. It implements multiple re-sampling strategies (both oversampling and undersampling) to balance class distributions before training, helping classification algorithms learn more robust decision boundaries on skewed data.
The package integrates seamlessly into scikit-learn workflows via a standard transformer interface, making it straightforward to include resampling in preprocessing pipelines. It depends on numpy, scipy, scikit-learn, joblib, and threadpoolctl, and supports Python 3.10 through 3.14. The project is actively maintained as part of the scikit-learn-contrib ecosystem.
Use it for
- Preprocess fraud detection datasets where fraudulent transactions are rare before training a classifier
- Balance medical diagnosis datasets with few positive cases to improve model sensitivity
- Prepare imbalanced text classification data for training with rare event prediction
- Create balanced training sets in credit risk or loan default prediction tasks
- Handle class imbalance in anomaly detection or rare failure prediction scenarios
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Active maintenance, low install friction, permissive MIT license, and no known vulnerabilities make this a safe choice. It solves a real, common problem in machine learning with a mature, well-integrated API. Install if you work with imbalanced classification datasets.
Install
imbalanced-learn on PyPI
Before you install
Low friction installation with a pure-Python wheel. Active maintenance with recent releases; last commit 2026-06-29. Depends on well-established scientific Python stack (numpy, scipy, scikit-learn, joblib).
License in practice
MIT license (permissive) allows use in commercial and private projects with minimal restrictions.
Quickstart
pip install imbalanced-learn
import imbalanced_learn
from sklearn.datasets import make_classification
X, y = make_classification()
# Use imbalanced-learn resampling techniques in preprocessing pipeline
Verify before relying
- Whether optional dependencies (Pandas, TensorFlow, Keras) are required for core functionality or only for specific features
- Performance characteristics when handling very large datasets
- Specific resampling algorithms included and their names
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 6 packagesnumpyscipyscikit-learnsklearn-compatjoblibthreadpoolctl |
| Maintenance | Actively maintained 68 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 16,822,922 / month, #1,138 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableEnvironment :: ConsoleIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/EngineeringTopic :: Software Development :: Libraries |
Evidence: imbalanced_learn-0.14.2-py3-none-any.whl
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 › “class imbalance resampling”
- imbalanced-learnProvides re-sampling techniques to address class imbalance in machine…
- imbalance-xgboostWraps XGBoost with weighted and focal loss functions to handle binary…
- percentifyPercentify provides one-call exploratory statistics and data-quality…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also imbalance-xgboost · imblearn · scikit-learn-extra · scikit-surprise · scikit-learn · bootstrapped · sklearn-compat · forestci · spark-sklearn · river