diff options
-rwxr-xr-x | train.py | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -15,7 +15,6 @@ from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.metrics import confusion_matrix from sklearn.metrics import accuracy_score -from sklearn.utils import check_array import argparse import numpy as np @@ -30,8 +29,8 @@ def normalise_faces(average_face, faces): # Split data into training and testing sets def test_split(n_faces, raw_faces, split, seed): random.seed(seed) - n_cases = 10 - n_pixels = 2576 + n_cases = 10 + n_pixels = 2576 raw_faces_split = np.split(raw_faces,n_cases) n_training_faces = int(round(n_cases*(1 - split))) @@ -75,7 +74,7 @@ M = args.eigen raw_faces = genfromtxt(args.data, delimiter=',') targets = np.repeat(np.arange(52),10) -n_faces = 52 +n_faces = 52 faces_train, faces_test, target_train, target_test = test_split(n_faces, raw_faces, args.split, args.seed) |