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

Addressing #85 #86

Merged

Conversation

torfjelde
Copy link
Member

@torfjelde torfjelde commented Mar 8, 2020

This PR implements StatsBase.params for TransformedDistribution, and Base.maximum, Base.minimum for UnivariateTransformedDistribution.

Up for discussion

  • StatsBase.params only returns the parameters of the underlying base distribution, i.e. params(td.dist). In the case where in addition the Bijector has parameters, is it then expected that these are also included in the return-value of params? Uncertain what makes the most sense. If so, this does increase the complexity of this PR a fair bit as it's not 100% clear how we'd do that in a nice way.

@arnavs
Copy link

arnavs commented Mar 8, 2020

I think just having the dist params is fine for now, but it would probably be ideal down the line to include the transform ones as well (though potentially in a different method.)

The reason I opened this issue (#85), by the way, was to check compatibility with Expectations.jl. This was per a JOSS reviewer comment from @oxinabox. I think it opens a broader question of whether we can add this sort of expectation functionality to Turing.

Copy link
Member

@mohamed82008 mohamed82008 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this ready to merge?

@torfjelde
Copy link
Member Author

torfjelde commented Mar 17, 2020

Should be good to go 👍

Wait!

@torfjelde
Copy link
Member Author

Should be good now, as long as the tests pass 👍

@mohamed82008 mohamed82008 merged commit dc95781 into TuringLang:master Mar 17, 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

Successfully merging this pull request may close these issues.

None yet

3 participants