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

fix the bug of pca mean not saving #482

Merged
merged 2 commits into from
May 2, 2023

Conversation

Sichao25
Copy link
Collaborator

@Sichao25 Sichao25 commented May 1, 2023

Fix the bug in the optimized sparse input PCA function that PCA mean matrix is not correctly saved.

@Xiaojieqiu
Copy link
Collaborator

@Sichao25 have you double checked the means / PCs are saved for all types of different pca approaches correctly?

@Sichao25
Copy link
Collaborator Author

Sichao25 commented May 1, 2023

PCs are saved in all methods. In Incremental/arpack/randomized PCA we call sklearn methods so the PCA means are automatically saved in the PCA object. If the sklearn TruncatedSVD is used, there won't be a PCA mean matrix (because TruncatedSVD will not center the input).

@Xiaojieqiu
Copy link
Collaborator

Xiaojieqiu commented May 1, 2023

in that case, please set the PCA mean matrix to be all zero. And the pca means should be saved in the adata.uns because we will need to create the reverse projection to make the perturbation predictions

@Xiaojieqiu Xiaojieqiu merged commit 2b9f302 into aristoteleo:master May 2, 2023
@Sichao25 Sichao25 deleted the pca_mean_bug branch June 1, 2023 18:09
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

Successfully merging this pull request may close these issues.

2 participants