gluonts.dataset.artificial.ar_p module#

gluonts.dataset.artificial.ar_p.ar_p(phi: numpy.ndarray, sigma: float, length: int, xhist: numpy.ndarray, c: float = 0.0, noise: Optional[numpy.ndarray] = None)[source]#

Generate samples from an AR(p) process.

Parametrized as in https://en.wikipedia.org/wiki/Autoregressive_model#Graphs_of_AR(p)_processes

Parameters
  • phi – model parameters. This should be a vector of length p

  • sigma – noise amplitude

  • c – constant

  • length – number of steps to sample

  • xhist – initial condition. This should be a vector of length p

  • noise – An optional vector of noise samples to use. If provided it should have len length. If it is not provided, samples from a standard normal are used.