# Module Scientific.Signals.Models

## Class AutoRegressiveModel: Auto-regressive model for stochastic process

This implementation uses the Burg algorithm to obtain the coefficients of the AR model.

Constructor: AutoRegressiveModel(order, data, delta_t=1.)

order

  the order of the model (an integer)

data

  the time series (sequence of floats)

delta_t

  the sampling interval for the time series (default: 1.)

Methods:

- predictStep()

  Return the next step in the series according to linear prediction. The returned value is also appended internally to the current trajectory, making it possible to call this method repeatedly in order to obtain a sequence of predicted steps.

- spectrum(omega)

  Return the frequency spectrum of the process at the angular frequencies omega (an array).

- correlation(nsteps)

  Return the autocorrelation function of the process (as estimated from the AR model) up to nsteps times the sampling interval.

- memoryFunction(nsteps)

  Return the memory function corresponding to the autocorrelation function of the process up to nsteps times the sampling interval.

- frictionConstant()

  Return the friction constant (the integral over the memory function) of the process.

## Class AveragedAutoRegressiveModel: Averaged auto-regressive model for stochastic process

An averaged model is constructed by averaging the model coefficients of several auto-regressive models of the same order. An averaged model is created empty, then individual models are added.

Constructor: AveragedAutoRegressiveModel(order, delta_t)

order

  the order of the model (an integer)

delta_t

  the sampling interval for the time series

Methods:

- add(model, weight=`1`)

  Add the coefficients of model to the average using weight.