Is there any way to get/show the data which is not chosen by undersampling approach?
rus = RandomUnderSampler(sampling_strategy=1, random_state=41)
x_res, y_res = rus.fit_resample(x, y)
Is there any way to get/show the data which is not chosen by undersampling approach?
rus = RandomUnderSampler(sampling_strategy=1, random_state=41)
x_res, y_res = rus.fit_resample(x, y)
Basically, this can be a little silly solution,
change your y_res & y into a list and pass it to the code below , to get the unselected data,
set1 = set(y)
set2 = set(y_res)
unselect= list(sorted(set1 - set2))
print('unselected data :', unselect)
might be other good solutions, but this can be a funny one.
Thumbs up if you like !!