imbalanced-dataset-sampler icon indicating copy to clipboard operation
imbalanced-dataset-sampler copied to clipboard

A (PyTorch) imbalanced dataset sampler for oversampling low frequent classes and undersampling high frequent ones.

Results 29 imbalanced-dataset-sampler issues
Sort by recently updated
recently updated
newest added

Hi, I am using BERT for multi label classification. The dataset is imbalance and I use ImbalancedDatasetSampler as the sampler. The train data has been tokenized, has id, mask and...

updates: - [github.com/pre-commit/pre-commit-hooks: v4.1.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.1.0...v5.0.0) - [github.com/PyCQA/isort: 5.10.1 → 5.13.2](https://github.com/PyCQA/isort/compare/5.10.1...5.13.2) - https://github.com/pre-commit/mirrors-yapf → https://github.com/google/yapf - [github.com/google/yapf: v0.32.0 → v0.40.2](https://github.com/google/yapf/compare/v0.32.0...v0.40.2) - [github.com/PyCQA/flake8: 4.0.1 → 7.1.1](https://github.com/PyCQA/flake8/compare/4.0.1...7.1.1)

If I can make one small quick suggestion, perhaps the two following plots in your README should have the same y axis limits. ![image](https://user-images.githubusercontent.com/8942987/164989326-dfaac90e-1abb-4553-be75-8e546d15c148.png)

https://github.com/zzw-zwzhang/Yoneed/blob/main/sampler.py#L15

Hi everyone, I have a question concering using subsets with this sampler. According to the code it chooses samples from all entries in the parent dataset: https://github.com/ufoym/imbalanced-dataset-sampler/blob/e9dd2deca6e058771533678b29b38a60843b0a85/torchsampler/imbalanced.py#L49-L50 Shouldn't it only...

I have added a few lines that allow to work with pytorch-geometric dataset. Since Pytorch-geometric data is saved as a list before being loaded by a Pytorch-geometric Dataloader, the modification...

`callback_get_label: a callback-like function which takes two arguments - dataset and index` This [no longer seems to be the case](https://github.com/ufoym/imbalanced-dataset-sampler/commit/ad50e22240c5316f8855db972542e1e2c388f839#diff-2df1f4597623f25e583732eb253eba0b08914c4a36d219d19dda17b9c7b3932dR42)? Please update how the new use-case looks like, because above...

I don't know if the val_dataset needle a balance. Thanks.

Thanks for the great work! I try to combine two datasets by using "dataset = dataset1+dataset2", and it gives me such error: AttributeError: 'ConcatDataset' object has no attribute 'get_labels' Is...

Hi ! I noticed that they are some bugs introduce with the last commit [ad50e22](https://github.com/ufoym/imbalanced-dataset-sampler/commit/ad50e22240c5316f8855db972542e1e2c388f839) Step to reproduce ` import torch from torchsampler import ImbalancedDatasetSampler mnist = torchvision.datasets.MNIST('.', train=True, download=True,...