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

handle empty bins gracefully #180

Closed
lukasheinrich opened this issue Jun 7, 2018 · 4 comments
Closed

handle empty bins gracefully #180

lukasheinrich opened this issue Jun 7, 2018 · 4 comments
Labels
feat/enhancement New feature or request

Comments

@lukasheinrich
Copy link
Contributor

Description

Poissons are only defined for rate parameters > 0. But it might well be that the histograms contain bins in which the total expected rate is 0 (perhaps the binning was chosen to include bins that never get filled).

Arguably those should be filtered out -- or we leave it up to the user, but then we should print a warning.

@matthewfeickert matthewfeickert added the feat/enhancement New feature or request label Jun 7, 2018
@kratsg
Copy link
Contributor

kratsg commented Aug 24, 2018

Can you add an example? I'm not sure I fully understand the issue here.

@matthewfeickert
Copy link
Member

@lukasheinrich So if I understand the idea, you're saying that as the p.mf. for the Poisson distribution is

then for bins with the p.m.f. is 0 and so they should be filtered out of the model as they don't contribute. I would think that this is the correct behavior, but can you or @kratsg think of instances in which they should not be? If so I guess I would think the default behavior should still be to filter them out but allow the user to pass some option that overrides this with a warning.

@kratsg
Copy link
Contributor

kratsg commented Aug 25, 2018

For Poissons, we have to filter them out. What's not clear to me is how the code is affected. I guess this is introducing some of the "divide by zero encountered" errors that we see from time to time.

@matthewfeickert
Copy link
Member

Closing this in favor of Issue #293.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat/enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants