shape # the label to predict is the id of the person y = lfw_people. shape # for machine learning we use the 2 data directly (as relative pixel # positions info is ignored by this model) X = lfw_people. INFO, format = ' %(asctime)s %(message)s ' ) # Download the data, if not already on disk and load it as numpy arrays lfw_people = fetch_lfw_people ( min_faces_per_person = 70, resize = 0.4 ) # introspect the images arrays to find the shapes (for plotting) n_samples, h, w = lfw_people. From time import time import logging import matplotlib.pyplot as plt from sklearn.model_selection import train_test_split from sklearn.model_selection import GridSearchCV from sklearn.datasets import fetch_lfw_people from trics import classification_report from trics import confusion_matrix from composition import PCA from sklearn.svm import SVC print ( _doc_ ) # Display progress logs on stdout logging.