lmlib.statespace.cost.RLSAlssmBase#

class lmlib.statespace.cost.RLSAlssmBase(betas=None)#

Bases: abc.ABC

Base Class for Recursive Least Square Alssm Classes

Parameters

betas (array_like of shape=(P,) of floats, None, optional) – Segment Scalars. Factors weighting each of the P cost segments. If betas is not set, the weight is for each cost segment 1.

Methods

__init__([betas])

filter(y[, v])

Computes the intermediate parameters for subsequent squared error computations and minimizations.

set_backend(backend)

Setting the backend computations option

Attributes

W

Filter Parameter \(W\)

betas

Segment scalars weights the cost function per segment

cost_model

Cost Model

kappa

Filter Parameter \(\kappa\)

nu

Filter Parameter \(\nu\)

xi

Filter Parameter \(\xi\)

property W#

Filter Parameter \(W\)

Type

ndarray

property betas#

Segment scalars weights the cost function per segment

Type

ndarray

property cost_model#

Cost Model

Type

CostSegment, CompositeCost

filter(y, v=None)#

Computes the intermediate parameters for subsequent squared error computations and minimizations.

Computes the intermediate parameters using efficient forward- and backward recursions. The results are stored internally, ready to solve the least squares problem using e.g., minimize_x() or minimize_v(). The parameter allocation allocate() is called internally, so a manual pre-allcation is not necessary.

Parameters
  • y (array_like) –

    Input signal
    RLSAlssm or RLSAlssmSteadyState

    Single-channel signal is of shape =(K,) for
    Multi-channel signal is of shape =(K,L)

    RLSAlssmSet or RLSAlssmSetSteadyState

    Single-channel set signals is of shape =(K,S) for
    Multi-channel set signals is of shape =(K,L,S)

    Multi-channel-sets signal is of shape =(K,L,S)

  • v (array_like, shape=(K,), optional) – Sample weights. Weights the parameters for a time step k and is the same for all multi-channels. By default the sample weights are initialized to 1.

K : number of samples
L : output order / number of signal channels
S : number of signal sets

property kappa#

Filter Parameter \(\kappa\)

Type

ndarray

property nu#

Filter Parameter \(\nu\)

Type

ndarray

set_backend(backend)#

Setting the backend computations option

Parameters

backend (str) – ‘py’, for python backend, ‘jit’ for Just in Time backend

property xi#

Filter Parameter \(\xi\)

Type

ndarray