using as many components as there are pixels would mean that we would not discard any information after the rotationand we would reconstruct the image perfectly we can also try to use pca to visualize all the faces in the dataset in scatter plot using the first two principal components (figure - )with classes given by who is shown in the imagesimilarly to what we did for the cancer datasetin[ ]mglearn discrete_scatter(x_train_pca[: ]x_train_pca[: ]y_trainplt xlabel("first principal component"plt ylabel("second principal component"figure - scatter plot of the faces dataset using the first two principal components (see figure - for the corresponding image for the cancer datasetas you can seewhen we use only the first two principal components the whole data is just big blobwith no separation of classes visible this is not very surprisinggiven that even with componentsas shown earlier in figure - pca only captures very rough characteristics of the faces dimensionality reductionfeature extractionand manifold learning