how to downsample categorical variables at the same time?

时间:2019-04-23 15:12:08

标签: python-3.x sampling categorical-data

I am working on a categorical dataset I need to undersample 3 variables based on a type _Box. Every categorical variable has many modalities. How can I have the same number of samples for each categorical variables per box_type?

I have tried to apply undersample first under one variable than try with train_test split to undersample each modality for the second variable with stratifying the first variable but I don't get the same number the rate changes. is there any suggestion thank you?

0 个答案:

没有答案