mglearn plots plot_nmf_faces(x_trainx_testimage_shapefigure - reconstructing three face images using increasing numbers of components found by nmf the quality of the back-transformed data is similar to when using pcabut slightly worse this is expectedas pca finds the optimum directions in terms of reconstruction nmf is usually not used for its ability to reconstruct or encode databut rather for finding interesting patterns within the data as first look into the datalet' try extracting only few components (say figure - shows the result unsupervised learning and preprocessing