The Math Behind: Everything About Principle Component Analysis (PCA)

PCA reduces the dimensionality of data points that are in many spaces. Some ready codes and libraries allow coders to create PCA easily, however, do you know what is PCA and how does it work mathematically?

Sera Giz Ozel
Apr 8 · 7 min read
Photo by Evie S. on Unsplash

How does PCA work mathematically?

1- Take features of the dataset, don’t consider Label.

2- Normalisation of Your Dataset

3- Calculate Covariance Matrix

What does this covariance matrix tell us?

4- Calculate EigenValues

5- Calculate Eigenvectors

6- Sort and Select

Our goal by using PCA was the creation of fewer dimensions, therefore we will select a number of eigenvectors according to the number of dimensions that we desired.

6. Create final data points with an eigenvectors matrix.

Geek Culture

Proud to geek out. Follow to join our +1.5M monthly readers.