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.compose
— Methodcompose(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 ∘
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
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.
Base.:-
— Method-(D::AbstractDistribution)
Computes the image distribution of D under negation, i.e. if x ∼ D then -x ∼ -D.
Base.:-
— Method-(v::AbstractVector{T}, D::AbstractDistribution{T})
Equivalent to +(v, -D).
-(D::AbstractDistribution{T}, v::AbstractVector{T})
Equivalent to +(D, -v).
Base.:*
— Method*(C::AbstractMatrix{T}, D::AbstractDistribution{T})
Equivalent to marginalize(D, DiracKernel(C)).
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.marginalize
— Methodmarginalise(D::AbstractDistribution, K::AbstractMarkovKernel)
Computes M, the marginalization of K with respect to D, i.e.,
M(y) = ∫ K(y,x)D(x) dx
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.invert
— Methodinvert(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.
MarkovKernels.posterior_and_loglike
— Methodposterior_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.
MarkovKernels.posterior_and_loglike
— Methodposterior_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.
MarkovKernels.posterior_and_loglike!
— Methodbayes_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.
MarkovKernels.posterior
— Methodposterior(D::AbstractDistribution, K::AbstractMarkovKernel, y)
Computes the conditional distribution C associated with the prior distribution D, measurement kernel K, and measurement y.
MarkovKernels.posterior
— Methodposterior(D::AbstractDistribution, L::AbstractLikelihood)
Computes the conditional distribution C associated with the prior distribution D and the log-likelihood L.