pyeeg.solvers.create_quadratic_regularizer

pyeeg.solvers.create_quadratic_regularizer(reg_type: str, n_lags: int, alpha: float = 1.0) ndarray

Factory function to create quadratic regularization matrices.

Parameters:

reg_typestr

Type of regularization: ‘smoothness’ or ‘laplacian’.

n_lagsint

Number of time lags.

alphafloat, optional

Regularization strength. Default is 1.0.

Returns:

Mndarray

Quadratic regularization matrix.

Raises:

ValueError

If reg_type is not recognized.