Distributions
We proved here the list of distribution implemented by the package.
Multivariate Normal distribution
Likelihood:
Terms of the canonical form:
where $\text{tril}$ is a function that returns the lower-triangular part of a matrix (diagonal not included).
ExpFamilyDistributions.Normal — Typemutable struct Normal{D} <: AbstractNormal{D}
param::P where P <: AbstractParameter
endNormal distribution with full covariance matrix.
Constructors
Normal(μ, Σ)
where μ is the mean and Σ is the covariance matrix.
Examples
julia> Normal([1.0, 1.0], [2.0 0.5; 0.5 1.0])
Normal{2}:
μ = [0.9999999999999998, 1.0]
Σ = [2.0 0.5; 0.5 1.0]ExpFamilyDistributions.NormalDiag — Typemutable struct NormalDiag{D} <: AbstractNormalDiag{D}
param::P where P <: AbstractParameter
endNormal distribution with a diagonal covariance matrix.
Constructors
NormalDiag(μ, v)where μ is the mean v is the diagonal of the covariance matrix.
Examples
julia> NormalDiag([1.0, 1.0], [2.0, 1.0])
NormalDiag{2}:
μ = [1.0, 1.0]
Σ = [2.0 0.0; 0.0 1.0]Gamma distribution
Likelihood:
Terms of the canonical form:
In practice, the Gamma structure in the package represents the distribution of D independent Gamma distributed variables.
ExpFamilyDistributions.Gamma — Typemutable struct Gamma{D} <: AbstractGamma
param::P where P <: AbstractParameter
endSet of D independent Gamma distributions.
Constructors
Gamma(α, β)where α and β are the shape and rate parameters of the distribution.
Examples
julia> Gamma([1.0, 1.0], [2.0, 2.0])
Gamma{2}:
α = [1.0, 1.0]
β = [2.0, 2.0]Dirichlet distribution
Likelihood:
Terms of the canonical form:
ExpFamilyDistributions.Dirichlet — Typemutable struct Dirichlet{D} <: AbstractDirichlet{D}
param::P where P <: AbstractParameter
endDirichlet distribution.
Constructors
Dirichlet(α)where α is a vector of concentrations.
Examples
julia> Dirichlet([1.0, 2.0, 3.0])
Dirichlet{3}:
α = [1.0, 2.0, 3.0]Wishart distribution
Likelihood:
where $X$ and $W$ are $D \times D$ symmetric positive definite matrices.
Terms of the canonical form:
ExpFamilyDistributions.Wishart — Typemutable struct Wishart{D} <: AbstractWishart{D}
param::P where P <: AbstractParameter
endWishart distribution.
Constructors
Wishart{D}()
Wishart(W[, v])where T is the encoding type of the parameters and W is a positive definite DxD matrix.
Examples
julia> Wishart([1 0.5; 0.5 1], 2)
Wishart{2}:
W = [0.9999999999999997 0.5; 0.5 1.0]
v = 2.0