Skip to content

Comments

Chain transformation#2968

Merged
twiecki merged 10 commits intopymc-devs:masterfrom
junpenglao:Chain_transformation
May 22, 2018
Merged

Chain transformation#2968
twiecki merged 10 commits intopymc-devs:masterfrom
junpenglao:Chain_transformation

Conversation

@junpenglao
Copy link
Member

Add chain transformation, with additional tests for distributions that are by default using transform.

Junpeng Lao added 4 commits May 5, 2018 11:36
distribution test in test_distributions.py has transformed set to None.
Here I also add tests to test the logp (shape and value) when in those distributions with default transform.
@junpenglao junpenglao added the WIP label May 6, 2018
@junpenglao junpenglao removed the WIP label May 10, 2018
@twiecki
Copy link
Member

twiecki commented May 19, 2018

This is great stuff! Can you add an example to the docs?

@junpenglao
Copy link
Member Author

Will work on it.

@junpenglao junpenglao added the WIP label May 19, 2018
@fonnesbeck
Copy link
Member

The API QuickStart would probably be the best place.

@junpenglao
Copy link
Member Author

junpenglao commented May 20, 2018

The API QuickStart would probably be the best place.

I was looking at the doc and thinking maybe changing http://docs.pymc.io/prob_dists.html is also an option?
My idea would be changing the title of the page:
Probability Distributions --> Random Variable and Probability Distributions
As it is more accurate.

And then add Transformation of variable before auto transformation, and different transformation after Auto-transformation (the logic is besides auto-transformation you can also specify transformation)

@twiecki
Copy link
Member

twiecki commented May 21, 2018

That sounds like a good spot.

Junpeng Lao added 2 commits May 21, 2018 12:06
So detecting transform name is more consistence.
Might not be backward compatible if users are accessing the transformed RV of `cov_cholesky_cov_pack__` in custom code.
Also rerun notebook and add additional explanation regarding to changes of variables.
@junpenglao
Copy link
Member Author

I follow @fonnesbeck's suggestion at the end - will change the Probability Distributions session in another PR.

@junpenglao junpenglao removed the WIP label May 21, 2018
@twiecki
Copy link
Member

twiecki commented May 21, 2018

"For example, we can combining the ordered transformation and logodd transformation to create 2D RVs that satisfy $x_1, x_2 \sim \text{Uniform}(0, 1) \space and \space x_1< x_2$"
->
"For example, we can combine the ordered transformation and logodd transformation using Chain to create 2D RVs that satisfy $x_1, x_2 \sim \text{Uniform}(0, 1) \space and \space x_1< x_2$"

@twiecki twiecki merged commit bf53d68 into pymc-devs:master May 22, 2018
@twiecki
Copy link
Member

twiecki commented May 22, 2018

It's a good one!

@junpenglao junpenglao deleted the Chain_transformation branch May 22, 2018 08:41
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.

3 participants