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

model.predict(adata) behavior, what is exactly obsm['CPA_pred'] ? #59

Open
aidenOwlen opened this issue Aug 27, 2024 · 1 comment
Open

Comments

@aidenOwlen
Copy link

Hi,

Regarding the tutorial on OOD perturbation prediction on Kang: https://colab.research.google.com/github/theislab/cpa/blob/master/docs/tutorials/Kang.ipynb

I don't get model.predict(adata) behavior, what is exactly saved in obsm['CPA_pred'] ? because afterwards R2 is computed between obsm["CPA_pred"] and layers["counts"]:
x_true = cat_adata.layers['counts']
x_pred = cat_adata.obsm['CPA_pred']

In the notebook tutorial x_true and x_pred have the same shape. Shouldn't the expected behavior be to take control cells and stimulate them ? In that case x_pred should have same number of samples as control cells for a particular cell_type, not the same number as stimulated cells. What am I missing ?

Thanks.

@pgm99
Copy link

pgm99 commented Sep 24, 2024

Hi, I have the same question. After some brainstorming, I understood that CPA_pred contains the predictions for all cells. Therefore, the prediction for control cells would represent "predicted stimulated cells," while the prediction for real stimulated cells would correspond to "reconstructed stimulated cells."

I'm not entirely sure if this interpretation is correct, so I would also appreciate confirmation from the authors.

Thanks.

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