# scikit-learn-contrib/imbalanced-learn

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

Repository: https://github.com/scikit-learn-contrib/imbalanced-learn
Canonical: https://ross.abutalabs.com/products/imbalanced-learn
Homepage: https://imbalanced-learn.org
Language: Python
License: MIT
License Family: permissive
Topics: machine-learning, python, statistics, data-science, data-analysis
Last push: 2026-06-29T16:33:16+00:00

## Health v2 (maintenance only)
Score: 83/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 90, release rhythm 63, longevity 100
- inputs: {"age_days": 4400, "days_push": 65, "days_rel": 87, "gap_med": 148.0, "n_releases_24m": 5}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 7121, forks 1360 (observed 2026-08-28T04:09:56.029188+00:00)

## What it is
imbalanced-learn is a Python library offering re-sampling techniques (over-sampling, under-sampling, and combinations) for datasets with strong class imbalance. It is fully compatible with scikit-learn and part of the scikit-learn-contrib ecosystem.

## Use cases
- handle imbalanced classification datasets
- apply SMOTE oversampling in Python
- undersample majority class in training data
- resample data before training a scikit-learn model
- fix class imbalance in fraud or anomaly detection datasets
- combine over- and under-sampling pipelines

## When to choose
- your classification dataset has heavily skewed class distributions
- you want scikit-learn-compatible transformers and pipelines for resampling
- you need well-established techniques like SMOTE, ADASYN, or Tomek links

## When to avoid
- your dataset is balanced or only mildly imbalanced
- you need deep-learning-specific imbalance handling outside the scikit-learn ecosystem
- you need anomaly detection rather than supervised resampling

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, data-science, testing
- domain: machine-learning, data-science
- platform: python, cross-platform
- tags: imbalanced-data, resampling, smote, scikit-learn, classification

## Member repositories
- scikit-learn-contrib/imbalanced-learn (main) score 83

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:09:56.029188+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:40:05.391976+00:00, confidence not recorded.
  - readme: https://github.com/scikit-learn-contrib/imbalanced-learn (fetched 2026-08-28T04:09:56.029188+00:00, sha f867bb6e62a1)
  - homepage: https://imbalanced-learn.org (fetched 2026-08-29T08:35:36.968768+00:00, sha 07f2c310a094)
  - registry_pypi: https://pypi.org/pypi/imbalanced-learn/json (fetched 2026-08-29T08:35:36.977773+00:00, sha eb1817d08179)
- Data as of 2026-08-30T08:39:29.467469+00:00.
