Performing dimensionality reduction with the built-in PCA algorithm
In this recipe, we will demonstrate how to use the built-in PCA algorithm to perform dimensionality reduction on a synthetic dataset. Dimensionality reduction involves bringing down the number of columns of a dataset to a smaller number of essential columns. If you're wondering why this is important, it's because some algorithms perform better and faster when dealing with fewer dimensions!
We will use the PCA algorithm on the unlabeled dataset from the Generating a synthetic dataset for analysis and transformation recipe and reduce the number of columns of that dataset from five to two. By using PCA, we will also notice that the resulting values are different from any of the row values from the original dataset.
Getting ready
This recipe continues from Generating a synthetic dataset for analysis and transformation.
How to do it…
The next set of steps focuses on using the unlabeled dataset...