diff options
-rwxr-xr-x | train.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -6,7 +6,7 @@ import matplotlib.pyplot as plt import sys import random - +from numpy import linalg as LA from random import randint from sklearn.neighbors import KNeighborsClassifier @@ -105,7 +105,7 @@ if args.faces: sys.exit("Can not plot eigenfaces when using LDA") for i in range(args.faces): ax = plt.subplot(2, args.faces/2, i + 1) - ax.imshow(pca.components_[i].reshape([46, 56])) + ax.imshow(pca.components_[i].reshape([46, 56]).T) plt.show() if args.principal: |