dirconn.methods.statespace.InnovationsForm#

class dirconn.methods.statespace.InnovationsForm(transition: ndarray, observation: ndarray, gain: ndarray, noise_cov: ndarray, channels: tuple[int, ...])#

A state-space model in innovations form.

z[t + 1] = transition @ z[t] + gain @ e[t] and y[t] = observation @ z[t] + e[t] with cov(e[t]) = noise_cov, where y are the channels channels of the VAR model the form was derived from.

transition#

A; for a VAR model of order p and n channels the companion matrix, n_states = n p.

Type:

ndarray, shape (n_states, n_states)

observation#

C.

Type:

ndarray, shape (n_observed, n_states)

gain#

K, the steady-state Kalman gain.

Type:

ndarray, shape (n_states, n_observed)

noise_cov#

Sigma, the covariance of the innovations e (the one-step prediction errors of y from its own past).

Type:

ndarray, shape (n_observed, n_observed)

channels#

Indices, in the original VAR model, of the observed channels.

Type:

tuple of int

__init__(transition: ndarray, observation: ndarray, gain: ndarray, noise_cov: ndarray, channels: tuple[int, ...]) → None#

Methods

__init__(transition, observation, gain, ...)

transfer_function(freqs, sfreq)

Return H(f) = I + C (exp(2 pi i f / sfreq) I - A)^-1 K, shape (n_freqs, n, n).

Attributes

n_channels

Number of observed channels.

transition

observation

gain

noise_cov

channels