// approach the boundary decision is already less biaised toward the majority
// class.
fig, (ax1, ax2) = plt.subplots(1, 2, figsize=(15, 7))
X, y = create_dataset(n_samples=10000, weights=(0.01, 0.05, 0.94))
clf = LinearSVC().fit(X, y)
plot_decision_function(X, y, clf, ax1)
After Change
// to generate a smoothed bootstrap instead. The plot below shows the difference
// between the two data generation strategies.
fig, axs = plt.subplots(1, 2, figsize=(15, 7))
sampler = RandomOverSampler(random_state=0)
plot_resampling(X, y, sampler, ax=axs[0])
axs[0].set_title("RandomOverSampler with normal bootstrap")
sampler = RandomOverSampler(smoothed_bootstrap=True, shrinkage=0.2, random_state=0)