Using Principal Component Analysis to find things that matter
Kernel PCA, in contrast to the PCA method that we just introduced, uses a user-defined kernel function to map the dataset with n dimensions to an m-dimensional feature space. PCA uses a linear function for the mapping and is equivalent to Kernel PCA with a linear kernel.
Kernel PCA can be especially useful if the data cannot be linearly separable so various nonlinear kernels can be used to map your data to higher dimensions.
Getting ready
To execute this recipe, you will need pandas
and Scikit
. No other prerequisites are required.
How to do it…
Once again, we wrap our model in a method so that we can track how long it takes for the model to converge. With Kernel PCA, you should expect significantly ...
Get Practical Data Analysis Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.