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

Implement bijector for gamma and exponential distributions #35

Open
bayesianbrad opened this issue Jan 22, 2018 · 2 comments
Open

Implement bijector for gamma and exponential distributions #35

bayesianbrad opened this issue Jan 22, 2018 · 2 comments
Assignees

Comments

@bayesianbrad
Copy link
Owner

Due to the support of these two distributions being defined only on the positive reals, we must ensure that we can transform the parameter space to the whole of $$ \mathbb{R}$$.

To do this we can use the $$\exp(Y) = X$$ transform and so the transforming to the unconstrained space $$Y$$ we have $$f_{y}(Y) = |\partial h(y) \ \partial y | f_{X}(h(y)) $$
which means that the transformed distribution is given as:
$$log_gamma(\alpha,\beta) = \frac{exp(y\beta - \exp(x)//\alpha}{\alpha^{\beta} \Gamma{\beta}}$$

@bayesianbrad bayesianbrad self-assigned this Jan 22, 2018
@haohaiziround
Copy link
Collaborator

haohaiziround commented Jan 24, 2018

@bradleygramhansen
Bijector from Edward.
https://github.com/blei-lab/edward/blob/master/edward/inferences/hmc.py

Transformation:
$$\theta \in (0, + \infinity) -> \tilde{\theta} = \log \theta$$
$$\theta \in (0, 1) -> \tilde{\theta} = \log \frac{ \theta}{1-\theta}$$

@bayesianbrad
Copy link
Owner Author

bayesianbrad commented Jan 27, 2018

  • Exponential constrain between (0, \infty) using log(\theta)
  • Gamma constrain between (0,\infty) using log(\theta)
  • Dirichlet constrain between (0,1) transform using log(\theta / \theta -1)

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