Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Principle:Scikit learn contrib Imbalanced learn Dataset Imbalancing

From Leeroopedia


Knowledge Sources
Domains Machine_Learning, Data_Preprocessing, Testing
Last Updated 2026-02-09 03:00 GMT

Overview

A utility technique for artificially introducing class imbalance into a balanced dataset to create controlled test scenarios for imbalanced learning methods.

Description

Dataset imbalancing is a testing and demonstration utility that takes a balanced dataset and reduces the number of samples in specified classes to create a controlled imbalanced distribution. This is useful for benchmarking resampling algorithms, demonstrating the effects of class imbalance, and generating reproducible test datasets.

Usage

Use this principle when creating toy or benchmark datasets to test resampling algorithms or demonstrate the impact of class imbalance on classifier performance.

Theoretical Basis

The imbalancing operation is a deterministic sub-sampling: for each target class, retain only the specified number of samples (randomly selected). This is equivalent to applying random under-sampling with specific target counts.

Related Pages

Implemented By

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment