Skip to content

Conversation

zhuxr11
Copy link

@zhuxr11 zhuxr11 commented Oct 12, 2025

Close #4560

This PR implemented PCA sign flip algorithm such that the max absolute value in each row is always positive in components, leaving trans_input unchanged, just like sklearn.decomposition.PCA.

In _mg version of PCA, components is not chunked. Thus, the _mg version can reuse sign flipping from single-GPU version (by setting stream = streams[0]). In this PR, cuml\decomposition\sign_flip_mg.hpp and cpp\src\pca\sign_flip_mg.cu are not in use (but the files are not removed).

@zhuxr11 zhuxr11 requested review from a team as code owners October 12, 2025 05:57
@zhuxr11 zhuxr11 requested a review from dantegd October 12, 2025 05:57
Copy link

copy-pr-bot bot commented Oct 12, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CUDA/C++ Cython / Python Cython or Python issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] PCA / TSVD sign flipping is unused and not correct

1 participant