Composition

Given Markov kernels $k_2(y,z)$ and $k_1(z,x)$, composition is a binary operator producing a third kernel $k_3(y,x)$ according to

\[k_3(y,x) = \int k_2(y,x) k_1(z,x) \mathrm{d} z.\]

MarkovKernels.composeMethod
compose(K2::AbstractMarkovKernel, K1::AbstractMarkovKernel)

Computes K3, the composition of K2 ∘ K1 i.e.,

K3(y,x) = ∫ K2(y,z) K1(z,x) dz.

See also

source
Base.:∘Method
∘(K2::AbstractMarkovKernel, K1::AbstractMarkovKernel)

Computes K3, the composition of K2 ∘ K1 i.e.,

K3(y,x) = ∫ K2(y,z) K1(z,x) dz.

See also compose

source

Algebra

Base.:+Method

+(v::AbstractVector{T}, D::AbstractDistribution{T}) +(D::AbstractDistribution{T}, v::AbstractVector{T})

Computes a translation of D by v, i.e. if x ∼ D then x + v ∼ D + v.

source
Base.:-Method

-(D::AbstractDistribution)

Computes the image distribution of D under negation, i.e. if x ∼ D then -x ∼ -D.

source
Base.:-Method

-(v::AbstractVector{T}, D::AbstractDistribution{T})

Equivalent to +(v, -D).

-(D::AbstractDistribution{T}, v::AbstractVector{T})

Equivalent to +(D, -v).

source
Base.:*Method
*(C::AbstractMatrix{T}, D::AbstractDistribution{T})

Equivalent to marginalize(D, DiracKernel(C)).

source

Marginalization

Given a distribution $\pi(x)$ and a Markov kernel $k(y,x)$, marginalization is a binary operator producing a new distriubution $p(y)$ according to

\[p(y) = \int k(y, x) \pi(x) \mathrm{d} x.\]

MarkovKernels.marginalizeMethod
marginalise(D::AbstractDistribution, K::AbstractMarkovKernel)

Computes M, the marginalization of K with respect to D, i.e.,

M(y) = ∫ K(y,x)D(x) dx

source

Bayes' rule & invert

Given a distribution $\pi(x)$ and a Markov kernel $k(y,x)$, invert is a binary operator producing a new distribution $m(y)$ and a new Markov kernel $p(x , y)$ according to

\[\pi(x) k(y,x) = m(y) p(x,y).\]

The related binary operator, Bayes' rule also evalautes the output of invert at some measurement $y$. That is, given a measurmeent $y$, $m$ evaluated at $y$ is the marginal likelihood and $p$ evaluated at $y$ is the conditional distribution of $x$ given $y$.

MarkovKernels.invertMethod

invert(D::AbstractDistribution, K::AbstractMarkovKernel)

Computes D2, K2, such that D(x)K(y, x) = D2(y)K2(x, y), i.e., an inverted factorisation of D, K.

source
MarkovKernels.posterior_and_loglikeMethod
posterior_and_loglike(D::AbstractDistribution, K::AbstractMarkovKernel, y)

Computes the conditional distribution C and the marginal log-likelihood ℓ associated with the prior distribution D, measurement kernel K, and measurement y.

source
MarkovKernels.posterior_and_loglikeMethod
posterior_and_loglike(D::AbstractDistribution, L::AbstractLikelihood)

Computes the conditional distribution C and the marginal log-likelihood ℓ associated with the prior distribution D and the log-likelihood L.

source
MarkovKernels.posterior_and_loglike!Method
bayes_rule!(D::AbstractParticleSystem, L::AbstractLikelihood)

Computes the conditional distribution C in-place and the marginal log-likelihood ℓ associated with the prior distribution D and the log-likelihood L.

source
MarkovKernels.posteriorMethod
posterior(D::AbstractDistribution, K::AbstractMarkovKernel, y)

Computes the conditional distribution C associated with the prior distribution D, measurement kernel K, and measurement y.

source
MarkovKernels.posteriorMethod
posterior(D::AbstractDistribution, L::AbstractLikelihood)

Computes the conditional distribution C associated with the prior distribution D and the log-likelihood L.

source