From 4a0b1bd9b6a622007e9e5b5e99f49c3a5249d16b Mon Sep 17 00:00:00 2001 From: nunzip Date: Fri, 8 Mar 2019 11:43:11 +0000 Subject: Change PCA color --- lenet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lenet.py b/lenet.py index 7c4c48c..39a5cd7 100644 --- a/lenet.py +++ b/lenet.py @@ -176,7 +176,7 @@ def test_classifier(model, x_test, y_true, conf_mat=False, pca=False): pca_rep = set_pca.fit_transform(pca_rep) print(pca_rep.shape) pca_rep, y_tmp = shuffle(pca_rep, y_true, random_state=0) - plt.scatter(pca_rep[:100, 0], pca_rep[:100, 1], c=y_true[:100], edgecolor='none', alpha=0.5, cmap=plt.cm.get_cmap('Spectral', 10)) + plt.scatter(pca_rep[:100, 0], pca_rep[:100, 1], c=y_true[:100], edgecolor='none', alpha=0.5, cmap=plt.cm.get_cmap('Paired', 10)) plt.xlabel('component 1') plt.ylabel('component 2') plt.colorbar(); -- cgit v1.2.3-54-g00ecf