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

[BUG] plot method of the Binomial distribution shows incorrect pmf. #416

Open
meraldoantonio opened this issue Jun 30, 2024 · 0 comments
Open
Labels

Comments

@meraldoantonio
Copy link
Contributor

meraldoantonio commented Jun 30, 2024

Describe the bug
The plot method of the Binomial distribution shows incorrect pmf.

To Reproduce

from skpro.distributions import Binomial
n = Binomial(n=10, p=0.5)
n.plot('pmf')
image

Expected behavior
The plot.("pmf") should show the correct Binomial plot, which looks like this:
image

Additional context - comments by @fkiraly from #415
Currently, the plotting function samples a grid of x points, plots x, f(x) for the function and connects them. If the grid does not hit the mass points, the plot will look like this.

The only way to have the correct plot always is to know where the support is. That is currenty not inspectable from the object, and that's why I wanted the sets symbolism from #244.

This bug is also referenced in #415

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant