1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| columns = ['Id', 'SepalLengthCm', 'SepalWidthCm', 'PetalLengthCm', 'PetalWidthCm', 'Label'] for i in range(2, 5): plt.subplot(1, 3, i - 1) plt.scatter(features[:, 1], features[:, i], c=labels, s=50, cmap='viridis') plt.title(columns[i]) plt.show()
start = 2 end = 5 fg, axs = plt.subplots(end - start, end - start, figsize=(25, 25)) for i in range(start, end): for j in range(start, end): axs[i - start, j - start].scatter(features[:, 1], features[:, i], c=labels, s=25, cmap='viridis') axs[i - start, j - start].set_title(columns[i] + ' - ' + columns[j])
|