ENH Remove count DataFrame from calculate_cooks#292
ENH Remove count DataFrame from calculate_cooks#292BorisMuzellec merged 27 commits intoscverse:mainfrom asistradition:main
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
umarteauowkin
left a comment
There was a problem hiding this comment.
Hi @asistradition , thanks a lot for this PR. I was wondering how important it was to you that we put _mu_LFC and _hat_diagonals in the obsm and not in the layers. I agree it makes sense not to store useless nan values. However, fundamentally, these matrices are more layers than simply obsm (we always have this issue between objects restricted to non zero genes and objects defined on all genes, ideallly we would like to have a layers field restricted to non zero genes but we don't). However, if you experience significant memory differences by keeping it in the layers, I will accept !
|
The main advantage to using As those keys are only used in |
for more information, see https://pre-commit.ci
|
Also includes an optional |
|
Thanks @asistradition for this PR! I agree with @umarteauowkin that on principle storing |
What does your PR implement? Be specific.
calculate_cookscastsnormed_countsinto a pandas DataFrame forrobust_method_of_moments_disp. This is memory inefficient for large data.robust_method_of_moments_disphas been refactored to accept an ndarray directly and the DataFrame has been removed. There is no numerical change as a result.