1from imblearn.over_sampling import RandomOverSampler
2
3ros = RandomOverSampler(sampling_strategy=sampling_strategy)
4X_res, y_res = ros.fit_resample(binary_X, binary_y)
5ax = y_res.value_counts().plot.pie(autopct=autopct)
6_ = ax.set_title("Over-sampling")
7