-
Notifications
You must be signed in to change notification settings - Fork 419
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
Add probs methods to discrete distributions #305
Conversation
Add probs methods to discrete distributions
I'm wondering if this couldn't reasonably be additional methods of the |
I was thinking the same thing as Stefan. |
This idea of using If the consensus is that it is ok to have |
To me this just seems like a vectorized version of the pdf function, which On Saturday, November 8, 2014, Dahua Lin notifications@github.com wrote:
|
The |
Since this special case would only make sense for discrete distributions, perhaps we should use |
Based on the feedback, I think I can take the following steps at this point:
Whereas for |
Think about it all, I lean more towards just using Whereas it might be too cute to have And |
As of v0.6.1, we are now using |
Computing pmf over a contiguous range can take advantage of the recursive relations in the pmf formula, and thus can be much more efficient than computing them individually using
pdf
.Hence, I introduce the
probs
function for discrete distribution, with the following semantics:This function can be used to get an entire probability vector efficiently.