aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtrain.py4
1 files 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: