Skip to content

DOC avoid clipping axis name in example #827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 13, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions examples/over-sampling/plot_shrinkage_effect.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
ax.add_artist(class_legend)
ax.set_xlabel("Feature #1")
_ = ax.set_ylabel("Feature #2")
plt.tight_layout()

# %%
# Now, we will use a :class:`~imblearn.over_sampling.RandomOverSampler` to
Expand All @@ -61,6 +62,7 @@
ax.add_artist(class_legend)
ax.set_xlabel("Feature #1")
_ = ax.set_ylabel("Feature #2")
plt.tight_layout()
# %%
# We observe that the minority samples are less transparent than the samples
# from the majority class. Indeed, it is due to the fact that these samples
Expand All @@ -79,6 +81,7 @@
ax.add_artist(class_legend)
ax.set_xlabel("Feature #1")
_ = ax.set_ylabel("Feature #2")
plt.tight_layout()

# %%
# In this case, we see that the samples in the minority class are not
Expand All @@ -97,6 +100,7 @@
ax.add_artist(class_legend)
ax.set_xlabel("Feature #1")
_ = ax.set_ylabel("Feature #2")
plt.tight_layout()

# %%
# Increasing the value of `shrinkage` will disperse the new samples. Forcing
Expand All @@ -112,6 +116,7 @@
ax.add_artist(class_legend)
ax.set_xlabel("Feature #1")
_ = ax.set_ylabel("Feature #2")
plt.tight_layout()

# %%
# Therefore, the `shrinkage` is handy to manually tune the dispersion of the
Expand Down