Skip to content

Commit

Permalink
Changes per @mhauru's comments
Browse files Browse the repository at this point in the history
Co-authored-by: Markus Hauru <[email protected]>
  • Loading branch information
penelopeysm and mhauru committed Jan 30, 2025
1 parent 8b6ae2f commit a722ab3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions _quarto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,3 +202,6 @@ using-turing-abstractmcmc: developers/inference/abstractmcmc-turing
using-turing-interface: developers/inference/abstractmcmc-interface
using-turing-variational-inference: developers/inference/variational-inference
using-turing-implementing-samplers: developers/inference/implementing-samplers
dev-transforms-distributions: developers/transforms/distributions
dev-transforms-bijectors: developers/transforms/bijectors
dev-transforms-dynamicppl: developers/transforms/dynamicppl
5 changes: 3 additions & 2 deletions developers/transforms/bijectors/index.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ A _bijection_ between two sets ([Wikipedia](https://en.wikipedia.org/wiki/Biject
That is to say, if we have two sets $X$ and $Y$, then a bijection maps each element of $X$ to a unique element of $Y$.
To return to our univariate example, where we transformed $x$ to $y$ using $y = \exp(x)$, the exponentiation function is a bijection because every value of $x$ maps to one unique value of $y$.
The input set (the domain) is $(-\infty, \infty)$, and the output set (the codomain) is $(0, \infty)$.
(Here, $(a, b)$ denotes the open interval from $a$ to $b$ but excluding $a$ and $b$ themselves.)

Since bijections are a one-to-one mapping between elements, we can also reverse the direction of this mapping to create an inverse function.
In the case of $y = \exp(x)$, the inverse function is $x = \log(y)$.
Expand All @@ -45,8 +46,8 @@ For example, taking the inverse function $\log(y)$ from above, its derivative is
However, we specified that the bijection $y = \exp(x)$ maps values of $x \in (-\infty, \infty)$ to $y \in (0, \infty)$, so the point $y = 0$ is not within the domain of the inverse function.
:::

Specifically, one of the primary purposes of Bijectors.jl is used to construct _bijections which map constrained distributions to unconstrained ones_.
For example, the log-normal distribution which we saw above is constrained: its _support_, i.e. the range over which $p(x) > 0$, is $(0, \infty)$.
Specifically, one of the primary purposes of Bijectors.jl is to construct _bijections which map constrained distributions to unconstrained ones_.
For example, the log-normal distribution which we saw in [the previous page]({{< meta dev-transforms-distributions >}}) is constrained: its _support_, i.e. the range over which $p(x) > 0$, is $(0, \infty)$.
However, we can transform that to an unconstrained distribution (the normal distribution) using the transformation $y = \log(x)$.

::: {.callout-note}
Expand Down

0 comments on commit a722ab3

Please sign in to comment.