Ross ROSS = Recommend OSS · open-source software intelligence for agents

ufoym/imbalanced-dataset-sampler

A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones. observed · 2026-08-28

github.com/ufoym/imbalanced-dataset-sampler · Python · MIT (permissive) observed · 2026-08-28

Health v2 · maintenance only

64/100

  • Activity 91
  • Release rhythm 8
  • Longevity 100
How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 3019
  • days_rel: n/a
  • days_push: 58
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

2326 stars · 266 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

A PyTorch dataset sampler (ImbalancedDatasetSampler, pip package torchsampler) that rebalances class distributions during training by oversampling rare classes and undersampling frequent ones. It estimates sampling weights automatically and plugs directly into DataLoader.

Use cases

  • handle imbalanced datasets in pytorch
  • oversample minority classes during training
  • prevent model bias toward majority class
  • balance class distribution in dataloader
  • train classifier on rare disease images

When to choose

  • you train PyTorch models on class-imbalanced data
  • you want automatic sampling weights without building a new balanced dataset

When to avoid

  • you use TensorFlow or non-PyTorch frameworks
  • you need advanced resampling like SMOTE

Facets

library · maturity stable

machine-learning data-science machine-learning deep-learning python pytorch sampler imbalanced-data oversampling undersampling

1 source

Member repositories

RepositoryRoleHealth v2
ufoym/imbalanced-dataset-samplermain64

For agents

markdown · JSON · MCP: product_card(name="ufoym/imbalanced-dataset-sampler")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem