Skip to content

← connectivity package

BayesianARDMVAR

Fit an adaptive multivariate autoregressive model (MVAR) using Bayesian regression with a grouped Automatic-Relevance-Determination (ARD) prior.

In each sliding window, one AR model is fit per target channel using evidence maximization: each (source -> target) edge has its own precision shared across the AR lags of that edge, and the data-driven update drives the precisions of uninformative edges to infinity, zeroing out those edges entirely. This yields a connectivity pattern with per-edge sparsity, analogous in sparsity semantics to the Group Lasso MVAR node but with two practical advantages: (a) the non-zero coefficients are less biased (once an edge's precision settles to a finite value, its AR lags are fit with essentially no shrinkage), and (b) fitting is closed-form per iteration rather than iterative optimization, and converges in typically 10-30 iterations on well-behaved EEG data. The output has the same format as the Group Lasso MVAR and Ridge MVAR nodes and can be fed directly into any dynamical-measure node (DTF, dDTF, PDC, etc.). The prior can optionally be given a Minnesota-style lag-decay structure in addition to the ARD sparsity. Caveat: the marginal-likelihood objective is non-convex, so the solution is not guaranteed to be unique; in rare edge cases ARD can be more aggressive about pruning weak-but-real signals than the group-lasso estimator. Warm- starting across sliding windows (enabled by default) mitigates this by propagating converged precisions forward in time. More Info... Version 0.7.0

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
INOUT

window_length

Length of the sliding estimation windows (in seconds).

verbose name
Sliding Window Length
default value
0.5
port type
FloatPort
value type
float (can be None)

window_step

Sliding window step size (in seconds).

verbose name
Sliding Window Step Size
default value
0.1
port type
FloatPort
value type
float (can be None)

window_func

Window function to apply to the sliding window.

verbose name
Window Function
default value
rect
port type
EnumPort
value type
str (can be None)

window_param

Parameter for the window function (needed for kaiser, gaussian, slepian, chebwin).

verbose name
Window Function Parameter
default value
None
port type
FloatPort
value type
float (can be None)

model_order

MVAR model order, i.e ., the number of AR taps per edge. A good value is in the 10-15 range.

verbose name
Model Order
default value
10
port type
IntPort
value type
int (can be None)

normalize_columns

Normalize columns of predictor and response matrices.

verbose name
Normalize Columns
default value
False
port type
BoolPort
value type
bool (can be None)

prior

Prior structure overlaid on top of the ARD sparsity mechanism. With 'ridge' (the default) the per-edge ARD precisions act isotropically across lags; with 'minnesota', a Litterman-style lag-decay is baked into the design matrix so that distant-lag coefficients are shrunk more strongly than recent ones, while ARD still controls per-edge sparsity on top of this lag-dependent scale.

verbose name
Prior Type
default value
ridge
port type
EnumPort
value type
str (can be None)

minnesota_lag_decay

Lag decay exponent for the Minnesota prior. The base prior standard deviation at lag l scales as 1 / l^decay. Only used when the 'minnesota' prior is selected.

verbose name
Minnesota Lag Decay
default value
1.0
port type
FloatPort
value type
float (can be None)

max_iter

Maximum number of evidence-maximization iterations per target equation. Typical convergence is within 10-30 iterations on well-behaved data; the cost per iteration is one Cholesky factorization of a (p*nchs) square matrix.

verbose name
Max Iterations
default value
50
port type
IntPort
value type
int (can be None)

tolerance

Convergence tolerance on the relative max change of the coefficient vector between consecutive iterations. Smaller values produce tighter fits at the cost of additional iterations.

verbose name
Convergence Tolerance
default value
0.001
port type
FloatPort
value type
float (can be None)

alpha_cap

Upper bound on the per-edge precision; edges whose precision reaches this cap are pruned (their coefficients are set to zero). Lower values give more aggressive pruning, higher values retain weakly-active edges.

verbose name
Pruning Threshold
default value
10000000000.0
port type
FloatPort
value type
float (can be None)

warmstart

Warm-start the ARD precisions from the previous sliding window. When enabled, each window inherits the converged precisions from the previous window as initial values, which typically halves the number of iterations required in the streaming case.

verbose name
Warm-Start Across Windows
default value
True
port type
BoolPort
value type
bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)