scikit-learn-contrib/imbalanced-learn

A Python Package to Tackle the Curse of Imbalanced Datasets in Machine Learning

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 38 minutes ago
Added to GitGenius on September 9th, 2026
Created on August 16th, 2014
Open Issues & Pull Requests: 88 (+0)
GitHub issues: Enabled
Number of forks: 1,365
Total Stargazers: 7,121 (+0)
Total Subscribers: 135 (+0)

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Issue API getrepoissuespagesummary failed: 429 Rate limit exceeded. Please try again later.

Detailed Description

imbalanced-learn is a Python package that provides resampling techniques for handling class imbalance in machine learning datasets.

The problem it solves is the challenge of training models on datasets where one class is significantly underrepresented compared to others. The package offers a collection of resampling methods that adjust the distribution of training data to mitigate this imbalance. These techniques work by either oversampling minority classes, undersampling majority classes, or combining both approaches. The tool integrates seamlessly with scikit-learn's pipeline and estimator interfaces, allowing practitioners to incorporate resampling as a preprocessing step within standard machine learning workflows.

The package suits practitioners working with imbalanced classification problems across domains such as fraud detection, disease diagnosis, or anomaly detection. It is particularly valuable for teams already using scikit-learn, since it follows the same API conventions and design patterns. Anyone adopting the tool should understand that resampling is one strategy among several for handling class imbalance; the README does not compare it to alternative approaches like cost-sensitive learning or threshold adjustment, so the choice depends on the specific characteristics of the problem at hand.

The project maintains active continuous integration across multiple testing platforms and enforces code style consistency through automated tooling. Development activity shows regular attention to dependency compatibility and test coverage. The package supports a range of Python versions and maintains compatibility with current versions of its core dependencies including NumPy, SciPy, and scikit-learn.