#series #ar #data #model #generate #random #process

autoregressive

Simple autoregressive model for generate series data

5 releases

0.1.5 Jan 31, 2024
0.1.4 Jan 31, 2024
0.1.3 Apr 19, 2021

#126 in Visualization

Apache-2.0

97KB
80 lines

Autoregressive Model

Very simple library to generate AR(N) models to generate series data from an autoregressive random process.

Please see Wiki.

Please see the documentation for a simple usage example and the repository for an example that generates a PNG chart.

Chart


lib.rs:

Create for sampling data from an autoregressive random process.

For more information, please see https://en.wikipedia.org/wiki/Autoregressive_model.

let mut ar = autoregressive::univariate::Autoregressive::new(0.0, 1.0, &[0.5]);

// Sample next value
let n = ar.step();

// Take 10 values as an iterator
let n10 = ar.take(10).collect::<Vec<f32>>();

Dependencies

~1MB
~20K SLoC