File tree 1 file changed +5
-0
lines changed 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 43
43
ax .add_artist (class_legend )
44
44
ax .set_xlabel ("Feature #1" )
45
45
_ = ax .set_ylabel ("Feature #2" )
46
+ plt .tight_layout ()
46
47
47
48
# %%
48
49
# Now, we will use a :class:`~imblearn.over_sampling.RandomOverSampler` to
61
62
ax .add_artist (class_legend )
62
63
ax .set_xlabel ("Feature #1" )
63
64
_ = ax .set_ylabel ("Feature #2" )
65
+ plt .tight_layout ()
64
66
# %%
65
67
# We observe that the minority samples are less transparent than the samples
66
68
# from the majority class. Indeed, it is due to the fact that these samples
79
81
ax .add_artist (class_legend )
80
82
ax .set_xlabel ("Feature #1" )
81
83
_ = ax .set_ylabel ("Feature #2" )
84
+ plt .tight_layout ()
82
85
83
86
# %%
84
87
# In this case, we see that the samples in the minority class are not
97
100
ax .add_artist (class_legend )
98
101
ax .set_xlabel ("Feature #1" )
99
102
_ = ax .set_ylabel ("Feature #2" )
103
+ plt .tight_layout ()
100
104
101
105
# %%
102
106
# Increasing the value of `shrinkage` will disperse the new samples. Forcing
112
116
ax .add_artist (class_legend )
113
117
ax .set_xlabel ("Feature #1" )
114
118
_ = ax .set_ylabel ("Feature #2" )
119
+ plt .tight_layout ()
115
120
116
121
# %%
117
122
# Therefore, the `shrinkage` is handy to manually tune the dispersion of the
You can’t perform that action at this time.
0 commit comments