Prior

Integrated Brownian Motion

Computes the initial parameters for the process prior using the q times integrated Brownian motion (IBM)

\[x^q(t) = \sigma B(t).\]

It has the analytical formulas for the parameters

\[Q_{ij} = 𝟙_{i\leq j}\frac{(\Delta t)^{j-i}}{(j-i)!}, \qquad R_{ij} = \sigma^2 \frac{(\Delta t)^{2q-1-i-j}}{(2q-1-i-j)(q-i)!(q-j)!}.\]
rodeo.prior.ibm.ibm_init(dt, n_deriv, sigma)[source]

Calculates the initial parameters necessary for the Kalman solver with the p-1 times integrated Brownian Motion, where the ODE is up to the p-1th derivative.

Parameters:
  • dt (float) – The step size between simulation points.

  • n_deriv (int) – Dimension of the prior.

  • sigma (ndarray(n_block)) – Parameter in variance matrix.

Returns:

  • wgt_state (ndarray(n_block, p, p)): Weight matrix defining the solution prior; \(Q\).

  • var_state (ndarray(n_block, p, p)): Variance matrix defining the solution prior; \(R\).

Return type:

(tuple)

rodeo.prior.ibm.ibm_state(dt, q, sigma)[source]

Calculate the state weight matrix and variance matrix of q-times integrated Brownian motion.

Parameters:
  • dt (float) – The step size between simulation points.

  • q (int) – The number of times to integrate the underlying Brownian motion.

  • sigma (float) – Parameter in the q-times integrated Brownian Motion.

Returns:

  • Q (ndarray(q+1, q+1)): The state weight matrix defined in Kalman solver.

  • R (ndarray(q+1, q+1)): The state variance matrix defined in Kalman solver.

Return type:

(tuple)

Independent Prior

This module combines prior parameters into a single block.

rodeo.prior.indep_init.indep_init(prior_pars)[source]

Combine blocks of prior parameters into dense matrices.

Parameters:

prior_pars (tuple) – A tuple containing the weight matrix and the variance matrix defining the solution prior; \(Q, R\).

Returns:

  • prior_weight (ndarray(1, n_block * p, n_block * p)): Transition matrix defining the solution prior; \(Q\).

  • prior_var (ndarray(1, n_block * p, n_block * p)): Variance matrix defining the solution prior; \(R\).

Return type:

(tuple)