Skip to content

Instantly share code, notes, and snippets.

@amankharwal
Created May 17, 2021 12:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amankharwal/fcbae639c51c912d80a7340f02748557 to your computer and use it in GitHub Desktop.
Save amankharwal/fcbae639c51c912d80a7340f02748557 to your computer and use it in GitHub Desktop.
from sklearn.datasets import make_circles
from sklearn.decomposition import KernelPCA
x, y = make_circles(n_samples=500, factor=0.1, noise=0.5)
kernel_PCA = KernelPCA(n_components=2, kernel="rbf", fit_inverse_transform=True, gamma=0.5)
x = kernel_PCA.fit_transform(x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment