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

piecewise uniform distribution? #518

Open
tawheeler opened this issue Aug 2, 2016 · 6 comments
Open

piecewise uniform distribution? #518

tawheeler opened this issue Aug 2, 2016 · 6 comments

Comments

@tawheeler
Copy link

Is there any chance for implementing a piecewise uniform distribution? (univariate or multivariate).
This is what a histogram generates.

Most stats functions on it should be well-defined; just not sure whether a fit function would be.

I can take a stab at it and submit a PR if desired.

@andreasnoack
Copy link
Member

Would it make sense for the applications you have in mind to overload the Histogram type in StatsBase and thereby making it a distribution?

@tawheeler
Copy link
Author

Do you mean AbstractHistogram{T<:Real,N,E} <: Distribution?
Thanks, I did not know about the Histogram type.

@andreasnoack
Copy link
Member

Maybe. I haven't really thought enough about it but it be worth trying out.

@tawheeler
Copy link
Author

tawheeler commented Aug 3, 2016

Worst case you could do encapsulation:

type PiecewiseUniform <: ContinuousUnivariate
   hist::Histogram
end

or similar.

That would let you do something similar for the multivariate case.

@andreasnoack
Copy link
Member

Reopening this since it doesn't appear to be resolved

@BenCurran98
Copy link

Hi, just wanted to see if this was still being considered? It would be very handy to some work I'm doing :)

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

No branches or pull requests

4 participants