tsf-rs

Crates.iotsf-rs
lib.rstsf-rs
version0.1.1
sourcesrc
created_at2020-12-04 14:49:30.577891
updated_at2020-12-04 15:01:05.52114
descriptionTime Series Forecast Implementation In Rust
homepagehttps://github.com/immortalinfidel/tsf-rs
repositoryhttps://github.com/immortalinfidel/tsf-rs
max_upload_size
id319639
size4,901
sabin chitrakar (sabinchitrakar)

documentation

README

TimeSeries Forecast (TSF)

 use tsf_rs::TSF;
 use ta_common::traits::Indicator;
let mut tsf = TSF::new(5);
assert_eq!(tsf.next(81.59), None);
assert_eq!(tsf.next(81.06), None);
assert_eq!(tsf.next(82.87), None);
assert_eq!(tsf.next(83.00), None);
assert_eq!(tsf.next(83.61), Some(84.22));
assert_eq!(tsf.next(83.15), Some(84.21399999999998));
assert_eq!(tsf.next(82.84), Some(83.12099999999998));
assert_eq!(tsf.next(83.99), Some(83.68099999999998));
assert_eq!(tsf.next(84.55), Some(84.44399999999997));
assert_eq!(tsf.next(84.36), Some(85.017));
assert_eq!(tsf.next(85.53), Some(85.97899999999998));
assert_eq!(tsf.next(86.54), Some(86.81799999999997));
assert_eq!(tsf.next(86.89), Some(87.63199999999998));
assert_eq!(tsf.next(87.77), Some(88.67199999999997));
assert_eq!(tsf.next(87.29), Some(88.22899999999996));

Commit count: 2

cargo fmt