📜  imblearn RandomOverSampler - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:36.205000             🧑  作者: Mango

代码示例1
from imblearn.over_sampling import RandomOverSampler

ros = RandomOverSampler(sampling_strategy=sampling_strategy)
X_res, y_res = ros.fit_resample(binary_X, binary_y)
ax = y_res.value_counts().plot.pie(autopct=autopct)
_ = ax.set_title("Over-sampling")