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

Possible replacement for #945 #958

Closed
wants to merge 5 commits into from
Closed

Conversation

mschauer
Copy link
Member

This is how I would approach #945, just as a start. It basically shows how to get the support business working without making the eltype a type parameter of the support. It helps to define support(d, epsilon) to find the numerical relevant support of unbounded distributions.

I illustrate how the type signature of DiscreteNonParametric can be extended to allow uni- and multivariate nonparametric distributions.

The crux is, that Discrete does not need to imply that the support is only Int. All discrete distributions in the original meaning of the word (outcomes can be enumerated, e.g https://en.wikipedia.org/wiki/Probability_mass_function) can also by of ValueSupport type Discrete. I introduced some errors, so this is really just a sketch.

@richardreeve
Copy link
Contributor

richardreeve commented Aug 23, 2019

As I've said before, I think we just fundamentally disagree about what constitutes a good design pattern for software. My code falls back to an error if you haven't implemented the correct methods (as the code currently does, and I fix in #945 and #951). Yours falls back to the wrong answer (adding a comment in some places that this "is just a fallback" does not help). When (admittedly a long time ago!) I did my PhD in CS, this was considered a bad idea. I'll look at the rest later.

@mschauer mschauer closed this Aug 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants