let' use pca to visualize the data reduced to two dimensions we plot the first two principal componentsand color each dot by its class (see figure - )in[ ]build pca model pca pca(n_components= pca fit(digits datatransform the digits data onto the first two principal components digits_pca pca transform(digits datacolors ["# ""# ""#bd ""# ""# ""# ""# ""# ""# ""# "plt figure(figsize=( )plt xlim(digits_pca[: min()digits_pca[: max()plt ylim(digits_pca[: min()digits_pca[: max()for in range(len(digits data))actually plot the digits as text instead of using scatter plt text(digits_pca[ ]digits_pca[ ]str(digits target[ ])color colors[digits target[ ]]fontdict={'weight''bold''size' }plt xlabel("first principal component"plt ylabel("second principal component"herewe actually used the true digit classes as glyphsto show which class is where the digits zerosixand four are relatively well separated using the first two principal componentsthough they still overlap most of the other digits overlap significantly dimensionality reductionfeature extractionand manifold learning