Skip to content
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions examples/datasets/plot_make_imbalance.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@
linewidth=0.15)
ax.set_title('make_imbalance ratio ({})'.format(ratio))

plt.tight_layout()
plt.show()
5 changes: 3 additions & 2 deletions examples/under-sampling/plot_allknn.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
ax2.scatter(X_res_vis[y_resampled == 1, 0], X_res_vis[y_resampled == 1, 1],
label="Class #1", alpha=.5, edgecolor=almost_black,
facecolor=palette[2], linewidth=0.15)
ax2.set_title('Edited nearest neighbours')
ax2.set_title('ENN')

# Apply the RENN
print('RENN')
Expand All @@ -72,7 +72,7 @@
ax3.scatter(X_res_vis[y_resampled == 1, 0], X_res_vis[y_resampled == 1, 1],
label="Class #1", alpha=.5, edgecolor=almost_black,
facecolor=palette[2], linewidth=0.15)
ax3.set_title('Repeated Edited nearest neighbours')
ax3.set_title('RENN')

# Apply the AllKNN
print('AllKNN')
Expand All @@ -89,4 +89,5 @@
facecolor=palette[2], linewidth=0.15)
ax4.set_title('AllKNN')

plt.tight_layout()
plt.show()
3 changes: 2 additions & 1 deletion examples/under-sampling/plot_instance_hardness_threshold.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
f, axs = plt.subplots(2, 2)

axs = [a for ax in axs for a in ax]
for ax, ratio in zip(axs, [0.0, 0.1, 0.3, 0.5]):
for ax, ratio in zip(axs, [0.0, 0.2, 0.6, 1.0]):
if ratio == 0.0:
ax.scatter(X_vis[y == 0, 0], X_vis[y == 0, 1], label="Class #0",
alpha=0.5, edgecolor=almost_black, facecolor=palette[0],
Expand All @@ -58,4 +58,5 @@
facecolor=palette[2], linewidth=0.15)
ax.set_title('Instance Hardness Threshold ({})'.format(ratio))

plt.tight_layout()
plt.show()
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
ax2.scatter(X_res_vis[y_resampled == 1, 0], X_res_vis[y_resampled == 1, 1],
label="Class #1", alpha=.5, edgecolor=almost_black,
facecolor=palette[2], linewidth=0.15)
ax2.set_title('Edited nearest neighbours')
ax2.set_title('ENN')

# Apply the RENN
print('RENN')
Expand All @@ -70,6 +70,7 @@
ax3.scatter(X_res_vis[y_resampled == 1, 0], X_res_vis[y_resampled == 1, 1],
label="Class #1", alpha=.5, edgecolor=almost_black,
facecolor=palette[2], linewidth=0.15)
ax3.set_title('Repeated Edited nearest neighbours')
ax3.set_title('RENN')

plt.tight_layout()
plt.show()