aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2019-03-10 18:21:29 +0000
committerVasil Zlatanov <v@skozl.com>2019-03-10 18:21:29 +0000
commitf60cf0650f8a1a4872308edff8ab2deb8503bb76 (patch)
tree58b88267a722cfaf02f8fbb316865b094e6910b7
parent8a8c3e9f19ea0114793edba4fce4a73e2624f6a5 (diff)
downloade4-gan-f60cf0650f8a1a4872308edff8ab2deb8503bb76.tar.gz
e4-gan-f60cf0650f8a1a4872308edff8ab2deb8503bb76.tar.bz2
e4-gan-f60cf0650f8a1a4872308edff8ab2deb8503bb76.zip
Slightly improve graphs
-rw-r--r--lenet.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/lenet.py b/lenet.py
index 273053d..9b4bb2e 100644
--- a/lenet.py
+++ b/lenet.py
@@ -161,9 +161,9 @@ def test_classifier(model, x_test, y_true, conf_mat=False, pca=False, tsne=False
set_pca = PCA(n_components=2)
pca_rep = set_pca.fit_transform(logits)
pca_rep, y_tmp = shuffle(pca_rep, y_true, random_state=0)
- plt.scatter(pca_rep[:1000, 0], pca_rep[:1000, 1], c=y_tmp[:1000], edgecolor='none', alpha=0.5, cmap=plt.cm.get_cmap('Paired', 10))
- plt.xlabel('component 1')
- plt.ylabel('component 2')
+ plt.scatter(pca_rep[:5000, 0], pca_rep[:5000, 1], c=y_tmp[:5000], edgecolor='none', alpha=0.5, cmap=plt.cm.get_cmap('Paired', 10))
+ plt.xlabel('Feature 1')
+ plt.ylabel('Feature 2')
plt.colorbar();
plt.show()
if tsne:
@@ -171,9 +171,9 @@ def test_classifier(model, x_test, y_true, conf_mat=False, pca=False, tsne=False
components = tsne.fit_transform(logits)
print(components.shape)
components, y_tmp = shuffle(components, y_true, random_state=0)
- plt.scatter(components[:1000, 0], components[:1000, 1], c=y_tmp[:1000], edgecolor='none', alpha=0.5, cmap=plt.cm.get_cmap('Paired', 10))
- plt.xlabel('component 1')
- plt.ylabel('component 2')
+ plt.scatter(components[:5000, 0], components[:5000, 1], c=y_tmp[:5000], edgecolor='none', alpha=0.5, cmap=plt.cm.get_cmap('Paired', 10))
+ plt.xlabel('Feature 1')
+ plt.ylabel('Feature 2')
plt.colorbar();
plt.show()