Skip to content
Automatic transformations for constrained random variables.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
src Wishart perf and stability (#33) Aug 4, 2019
test add numerical test and increase tolerance for inverse test Jan 12, 2019
.travis.yml Update .travis.yml Apr 17, 2019
LICENSE Initial commit Sep 13, 2018
Manifest.toml update Manifest file Apr 17, 2019
Project.toml Inc version number. Aug 4, 2019 Update Dec 1, 2018
REQUIRE fix eps, Real and AD support Dec 2, 2018
appveyor.yml Create appveyor.yml Sep 28, 2018


Build Status Build status

This package implements a set of functions for transforming constrained random variables (e.g. simplexes, intervals) to Euclidean space. The 3 main functions implemented in this package are the link, invlink and logpdf_with_trans for a number of distributions. The distributions supported are:

  1. RealDistribution: Union{Cauchy, Gumbel, Laplace, Logistic, NoncentralT, Normal, NormalCanon, TDist},
  2. PositiveDistribution: Union{BetaPrime, Chi, Chisq, Erlang, Exponential, FDist, Frechet, Gamma, InverseGamma, InverseGaussian, Kolmogorov, LogNormal, NoncentralChisq, NoncentralF, Rayleigh, Weibull},
  3. UnitDistribution: Union{Beta, KSOneSided, NoncentralBeta},
  4. SimplexDistribution: Union{Dirichlet},
  5. PDMatDistribution: Union{InverseWishart, Wishart}, and
  6. TransformDistribution: Union{T, Truncated{T}} where T<:ContinuousUnivariateDistribution.

All exported names from the Distributions.jl package are reexported from Bijectors.


  1. link: maps a sample of a random distribution dist from its support to a value in R^n. Example:
julia> using Bijectors

julia> dist = Beta(2, 2)
Beta{Float64}=2.0, β=2.0)

julia> x = rand(dist)


julia> y = link(dist, x)
  1. invlink: the inverse of the link function. Example:
julia> z = invlink(dist, y)

julia> x == z
  1. logpdf_with_trans: finds log of the (transformed) probability density function of a distribution dist at a sample x. Example:
julia> using Bijectors

julia> dist = Dirichlet(2, 3)
Dirichlet{Float64}(alpha=[3.0, 3.0])

julia> x = rand(dist)
2-element Array{Float64,1}:

julia> logpdf_with_trans(dist, x, false) # ignoring the transformation

julia> logpdf_with_trans(dist, x, true) # considering the transformation
You can’t perform that action at this time.