diff --git a/examples/datasets/plot_make_imbalance.py b/examples/datasets/plot_make_imbalance.py index 60bc5eebc..7533d6dc4 100644 --- a/examples/datasets/plot_make_imbalance.py +++ b/examples/datasets/plot_make_imbalance.py @@ -52,4 +52,5 @@ linewidth=0.15) ax.set_title('make_imbalance ratio ({})'.format(ratio)) +plt.tight_layout() plt.show() diff --git a/examples/under-sampling/plot_allknn.py b/examples/under-sampling/plot_allknn.py index 6995183e8..056a94798 100644 --- a/examples/under-sampling/plot_allknn.py +++ b/examples/under-sampling/plot_allknn.py @@ -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') @@ -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') @@ -89,4 +89,5 @@ facecolor=palette[2], linewidth=0.15) ax4.set_title('AllKNN') +plt.tight_layout() plt.show() diff --git a/examples/under-sampling/plot_instance_hardness_threshold.py b/examples/under-sampling/plot_instance_hardness_threshold.py index 46bc29a31..16bf90032 100644 --- a/examples/under-sampling/plot_instance_hardness_threshold.py +++ b/examples/under-sampling/plot_instance_hardness_threshold.py @@ -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], @@ -58,4 +58,5 @@ facecolor=palette[2], linewidth=0.15) ax.set_title('Instance Hardness Threshold ({})'.format(ratio)) +plt.tight_layout() plt.show() diff --git a/examples/under-sampling/plot_repeated_edited_nearest_neighbours.py b/examples/under-sampling/plot_repeated_edited_nearest_neighbours.py index 82e6f4f0d..d7c124ac6 100644 --- a/examples/under-sampling/plot_repeated_edited_nearest_neighbours.py +++ b/examples/under-sampling/plot_repeated_edited_nearest_neighbours.py @@ -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') @@ -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()