# Niezbalansowane klasy i wartości odstające

EN: **Class imbalance and outliers** · id `classimbalance` · aliases: class imbalance, outliers, resampling

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Dane dla AI](https://aiatlasgraph.com/t/data.md) › [Czyszczenie i jakość](https://aiatlasgraph.com/t/cleaning.md) › Niezbalansowane klasy i wartości odstające

## Description

- PL: Rozpoznawanie i obsługa danych, w których jedna klasa dominuje albo trafiają się nietypowe przykłady, zanim zepsują trening i ocenę.
- EN: Spotting and handling data where one class dominates or unusual examples appear, before they distort training and evaluation.

## In one sentence

- PL: To rozpoznawanie sytuacji, w których jedne przykłady dominują, a inne są rzadkie lub nietypowe.
- EN: This identifies collections where some kinds of examples dominate and others are rare or unusual.

## Problem it solves

- PL: Model może ignorować ważne rzadkie przypadki lub dopasowywać się do pojedynczych dziwnych wpisów.
- EN: A model may ignore important rare cases or fit itself to a few unusual entries.

## What it does

- PL: Sprawdza proporcje i odstające wpisy, a potem może zmienić częstość przykładów lub ich znaczenie podczas nauki.
- EN: It checks proportions and unusual entries, then can adjust how often examples appear or how much they matter during learning.

## Everyday example

- PL: System ma wykrywać uszkodzone paczki, lecz zdjęcia całych paczek dominują; sprawdzasz, czy model nadal zauważa rzadkie uszkodzenia.
- EN: A parcel damage detector mostly learns from intact parcels, so you check whether it still notices the rare damaged ones.

## This concerns you if you…

- PL: ważne przypadki zdarzają się rzadko
- PL: masz nietypowe wpisy, które mogą wypaczać wyniki
- EN: need a model to handle rare but important cases
- EN: have unusual entries that could distort results

## Keywords

SMOTE · random oversampling · random undersampling · class weights · Isolation Forest · robust scaling

## How it works

- PL: Częstości klas i rozkłady cech ujawniają dominujące grupy oraz nietypowe obserwacje. Resampling, wagi funkcji straty i odporne transformacje zmieniają wpływ próbek na uczenie, a metryki liczy się osobno dla klas.
- EN: Class frequencies and feature distributions reveal dominant groups and unusual observations. Resampling, loss weights and robust transformations change sample influence during training, while metrics are computed separately by class.

## Limits

- PL: Nadpróbkowanie może powielać szum, a odrzucanie odstających obserwacji usuwać prawdziwe zdarzenia. Zmiana proporcji treningowych wpływa na kalibrację i wymaga oceny przy rzeczywistych częstościach.
- EN: Oversampling can repeat noise, while discarding outliers can remove real events. Changing training proportions affects calibration and requires evaluation at actual deployment frequencies.

## Key terms

- PL: **resampling**: Zmiana częstości wybierania próbek podczas treningu.
- PL: **waga klasy**: Mnożnik kosztu błędu dla przykładów danej kategorii.
- EN: **resampling**: Changing how frequently samples are selected during training.
- EN: **class weight**: A multiplier on error costs for examples in a category.

## Know first

- [Metryki klasyfikacji i regresji (Classification and regression metrics)](https://aiatlasgraph.com/t/classmetrics.md)
- [Uczenie nadzorowane (Supervised learning)](https://aiatlasgraph.com/t/supervised.md)

## Examples

- PL: Nadpróbkowanie i podpróbkowanie · wagi klas · wykrywanie outlierów
- EN: Oversampling and undersampling · class weights · outlier detection

## Related topics

Untyped, symmetric "see also" links.

- [Wykrywanie anomalii i nowości (Outlier and novelty detection)](https://aiatlasgraph.com/t/anomalydetection.md)

## Sources

- [Introduction to Data-Centric AI (MIT IAP course, 2023–2024)](<https://dcai.csail.mit.edu/>) `dcai-mit` · by MIT CSAIL (prowadzący na stronie tylko z imion: Anish, Curtis, Jonas)

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/classimbalance · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
