-
Notifications
You must be signed in to change notification settings - Fork 2
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
sprand as samples from sparse distribution #3
Comments
Sounds like a very interesting idea. It would require to have the non-zero struture depend on the values (i.e. test each produced value for nullity), so I wonder whether possible multiple allocations would have negative performance impact. But definitely worth exploring. I may be even possible to support both API (for now I guess I prefer to not get rid of the current API, as it feels closer to the |
For sure, if the In any case, even if |
Cool!!
Sorry for that, the internals have quite evolved last time I worked on it, and didn't document yet. Feel free to open an issue to ask for help, and I will answer there or write documentation (but I will have very little time in the upcoming week).
I don't have a lot of hopes for |
I was thinking, in the spirit of this package, maybe
rand(Normal(),SparseMatrixCSC,p,m,n)
could be better expressed asrand(Bernoulli(p,Normal()),SparseMatrixCSC,m,n)
whereBernoulli(p, Normal())
would be the "Gauss-Bernoulli" or "Spike-and-Slab" mixture distributionP(x) = (1-p) delta(x)+ p Normal(x)
It seems to make things a bit more generic.
The text was updated successfully, but these errors were encountered: