How the PCA algorithm works

The algorithm finds vectors to create a hyperplane of target dimensionality that minimizes the reconstruction error, measured as the sum of the squared distances of the data points to the plane. As illustrated above, this goal corresponds to finding a sequence of vectors that align with directions of maximum retained variance given the other components while ensuring all principal components are mutually orthogonal.

In practice, the algorithm solves the problem either by computing the eigenvectors of the covariance matrix or using the singular value decomposition.

We illustrate the computation using a randomly generated three-dimensional ellipse with 100 data points, shown in the left panel of the following screenshot, including the two-dimensional hyperplane defined by the first two principal components (see the the_math_behind_pca notebook for the following code samples):

 Three-dimensional ellipse and two-dimensional hyperplane 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
52.14.126.74