AGENT SKILL

class-imbalance

What to do when one class is rare.

License 许可
MIT
最近更新
2026-10-25
Stars
★ 0
Forks
0

01 前言 Front Matter

name
class-imbalance
metadata
{ "beyondml": { "kind": "knowledge" } }
description
What to do when one class is rare.

03 SKILL.md 正文

  • Below about 20% minority share, accuracy misleads; use F1 or recall.
  • Prefer class_weight="balanced" (the search applies it when the profile flags imbalance) over resampling.
  • Stratify every split so the rare class appears in train and test.
  • Do not oversample before splitting; that leaks copies of test rows into training.

04 同仓库更多 Skills