DNABERT icon indicating copy to clipboard operation
DNABERT copied to clipboard

Sampling of Training Dataset via WeightedRandomSampler for Imbalanced Classes

Open mosala777 opened this issue 3 years ago • 0 comments

Hello, I wanted to ask if it is possible to use weighted random sampling for cases of imbalanced datasets? I tried replacing the sampling methods but the tensor dataset for training_dataset is not matching correctly and gives the error: "IndexError: too many indices for tensor of dimension 2."

I think I am missing something in the script. Would appreciate if you could help.

Thank you!

mosala777 avatar Jan 26 '22 05:01 mosala777