From 1b1d22a025c23703b05b08204276a4066ebbe9bc Mon Sep 17 00:00:00 2001 From: nunzip Date: Tue, 23 Oct 2018 16:51:08 +0100 Subject: Rotate faces --- train.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/train.py b/train.py index cdf3f5e..a2d9d4b 100755 --- a/train.py +++ b/train.py @@ -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: -- cgit v1.2.3-54-g00ecf