scvi-tools icon indicating copy to clipboard operation
scvi-tools copied to clipboard

Faster NB LL computation if data is known to be sparse

Open adamgayoso opened this issue 4 years ago • 0 comments

We should add an is_sparse param to our distributions (at least NB, with LL computation here)

As an example in Pyro for Poisson, see here

If X is known to be sparse, we'd only have to compute the middle term for those 0 entries (r is inv. disp., m is mean, k is x).

Screen Shot 2021-04-25 at 8 11 43 PM

adamgayoso avatar Apr 26 '21 03:04 adamgayoso