.. _book_fig_chapter7_fig_S_manifold_PCA: Comparison of PCA and Manifold Learning --------------------------------------- Figure 7.8 A comparison of PCA and manifold learning. The top-left panel shows an example S-shaped data set (a two-dimensional manifold in a three-dimensional space). PCA identifies three principal components within the data. Projection onto the first two PCA components results in a mixing of the colors along the manifold. Manifold learning (LLE and IsoMap) preserves the local structure when projecting the data, preventing the mixing of the colors. .. image:: ../images/chapter7/fig_S_manifold_PCA_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_S_manifold_PCA.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_S_manifold_PCA.py :lines: 13- .. raw:: html
:download:`[download source: fig_S_manifold_PCA.py] ` .. raw:: html