How to Solve NameError: name 'KernelPCA' is not defined -- sklearn

Solution: Import the 'PCA, KernelPCA' module

To Solve the error, add the following line to the top of your code.

from sklearn import  KernelPCA

 

For more information:
Python KernelPCA sklearn