The principal component analysis approach to dimensionality reduction
In this section, we will learn about the general idea of PCA and go through the steps for performing PCA on our dataset.
PCA is a method for reducing the dimensions of data by using some ideas from linear algebra to map the rows from a feature variable matrix X from its default d-dimensional space to an r-dimensional space for some r < d by making use of principal components and the subsequent use of these components in understanding the data better.
From the previous section, we know that there are two types of dimensionality reduction methods: feature elimination and feature extraction. PCA falls into the latter category. It combines our input feature variables in a way that allows us to drop the least important variables (out of the new feature variables generated after performing PCA) while still retaining the valuable parts of all the input variables. In addition, the new feature variables after...