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

BUG Fixes kernel PCA raising "invalid value encountered in mul… #16718

Merged
merged 2 commits into from Mar 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion sklearn/decomposition/_kernel_pca.py
Expand Up @@ -216,7 +216,7 @@ def _fit_transform(self, K):

# flip eigenvectors' sign to enforce deterministic output
self.alphas_, _ = svd_flip(self.alphas_,
np.empty_like(self.alphas_).T)
np.zeros_like(self.alphas_).T)

# sort eigenvectors in descending order
indices = self.lambdas_.argsort()[::-1]
Expand Down