.. _book_fig_chapter7_fig_PCA_rotation: Scematic Diagram of PCA ----------------------- Figure 7.2 A distribution of points drawn from a bivariate Gaussian and centered on the origin of x and y. PCA defines a rotation such that the new axes (x' and y') are aligned along the directions of maximal variance (the principal components) with zero covariance. This is equivalent to minimizing the square of the perpendicular distances between the points and the principal components. .. image:: ../images/chapter7/fig_PCA_rotation_1.png :scale: 100 :align: center .. raw:: html
**Code output:** .. raw:: html
.. literalinclude:: fig_PCA_rotation.txt .. raw:: html
**Python source code:** .. raw:: html
.. literalinclude:: fig_PCA_rotation.py :lines: 12- .. raw:: html
:download:`[download source: fig_PCA_rotation.py] ` .. raw:: html