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

TransformedDistributions should support maximum, minimum #85

Closed
arnavs opened this issue Mar 7, 2020 · 4 comments
Closed

TransformedDistributions should support maximum, minimum #85

arnavs opened this issue Mar 7, 2020 · 4 comments

Comments

@arnavs
Copy link

arnavs commented Mar 7, 2020

Was testing these against the UnivariateDistribution fallback in Expectations.jl, but it fails because these methods aren't defined.

@arnavs
Copy link
Author

arnavs commented Mar 7, 2020

Same for params()

@torfjelde
Copy link
Member

I actually had a branch lying around with implementations for this:) But I didn't make it into a PR yet as it's slightly unclear to me whether or not params should return the parameters of the underlying distribution, i.e. params(td.dist), or if it should also include parameters for the Bijector. If so, there's a fair bit of work and planning that needs to go into it. But, if users expect params to return only the parameters of the distribution, then this is no problem (see #86)

@arnavs
Copy link
Author

arnavs commented Mar 8, 2020

That's a good point about params.

I think including the transformation params would be best (Ideally in a "flat" way, e.g. (mu, sigma, transformationstuff...) as opposed to ((mu, sigma...), (transformationstuf...)). But shouldn't be a showstopper IMO.

mohamed82008 pushed a commit that referenced this issue Mar 17, 2020
* added maximum and minimum for transformed distributions

* restrict max and min impls to UnivariateTransformed

* changed a comment

* made overload of Distributions.params explicit

* removed redundant import
@arnavs
Copy link
Author

arnavs commented Mar 19, 2020

Closing as the PR was merged.

@arnavs arnavs closed this as completed Mar 19, 2020
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

2 participants