Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KernelPCA reconstruct problem #198

Open
hzgzh opened this issue Jul 14, 2022 · 1 comment
Open

KernelPCA reconstruct problem #198

hzgzh opened this issue Jul 14, 2022 · 1 comment

Comments

@hzgzh
Copy link

hzgzh commented Jul 14, 2022

I try using KernelPCA to transform and reconstruct the data, but original data and reconstruct data is not approx.

using Plots,MultivariateStats
x = rand(10,100)
m = fit(KernelPCA,x;inverse =true
y=reconstruct(m, predict(m, x))
plot([x[1,:] y[1,:])

how to make the reconstruct data approximate the origin data

@wildart
Copy link
Collaborator

wildart commented Jul 19, 2022

Kernel PCA reconstructions is always approximate, especially out-of-sample, as it generally requires solving a quadratic optimization problem. So, the reconstruction will be always off with respect to the original data. The package uses a heuristic for an approximate reconstruction, i.e. quadratic optimization, which produces even worst approximation. See #125 for references.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants