Continous transition node

ReactiveMP.ContinuousTransitionType

The ContinuousTransition node transforms an m-dimensional (dx) vector x into an n-dimensional (dy) vector y via a linear (or nonlinear) transformation with a n×m-dimensional matrix A that is constructed from a vector a. ContinuousTransition node is primarily used in two regimes:

When no structure on A is specified:

transformation = a -> reshape(a, 2, 2)
...
a ~ MvNormalMeanCovariance(zeros(2), Diagonal(ones(2)))
y ~ ContinuousTransition(x, a, W) where {meta = CTMeta(transformation)}
...

When some structure if A is known:

transformation = a -> [cos(a[1]) -sin(a[1]); sin(a[1]) cos(a[1])]
...
a ~ MvNormalMeanCovariance(zeros(1), Diagonal(ones(1)))
y ~ ContinuousTransition(x, a, W) where {meta = CTMeta(transformation)}
...

To construct the matrix A, the elements of a are reshaped into A according to the transformation function provided in the meta. If you intend to use univariate Gaussian distributions, use it as a vector of length 1, e.g.a ~ MvNormalMeanCovariance([0.0], [1.;])`.

Check ContinuousTransitionMeta for more details on how to specify the transformation function that must return a matrix.

y ~ ContinuousTransition(x, a, W) where {meta = ContinuousTransitionMeta(transformation)}

Interfaces:

  1. y - n-dimensional output of the ContinuousTransition node.
  2. x - m-dimensional input of the ContinuousTransition node.
  3. a - any-dimensional vector that casts into the matrix A.
  4. W - n×n-dimensional precision matrix used to soften the transition and perform variational message passing.

Note that you can set W to a fixed value or put a prior on it to control the amount of jitter.

source
ReactiveMP.ContinuousTransitionMetaType

ContinuousTransitionMeta is used as a metadata flag in ContinuousTransition to define the transformation function for constructing the matrix A from vector a.

ContinuousTransitionMeta requires a transformation function and the length of vector a, which acts as an expansion point for approximating the transformation linearly. If transformation appears to be linear, then no approximation is performed.

Constructors:

  • ContinuousTransitionMeta(transformation::Function, â::Vector{<:Real}): Constructs a ContinuousTransitionMeta struct with the transformation function and allocated basis vectors.

Fields:

  • f: Represents the transformation function that transforms vector a into matrix A

The ContinuousTransitionMeta struct plays a pivotal role in defining how the vector a is transformed into the matrix A, thus influencing the behavior of the ContinuousTransition node.

source
ReactiveMP.ctcompanion_matrixFunction
`ctcompanion_matrix` casts a vector `a` into a matrix `A` by means of linearization of the transformation function `f` around the expansion point `a0`.
source