Crate dtw_rs

Source
Expand description

§DTW_RS

A Dynamic Time Warping (DTW) library for Rust

Computation methods:

  • Dynamic programming
  • Dynamic programming with the Sakoe-Chuba Band
  • Dynamic programming with the Itakura Parallelogram (future plan)
  • FastDTW (future plan)
use dtw_rs::{Algorithm, DynamicTimeWarping};

let a = [1.0, 3.0, 9.0, 2.0, 1.0];
let b = [2.0, 0.0, 0.0, 8.0, 7.0, 2.0];

let dtw = DynamicTimeWarping::between(&a, &b);

println!("Distance: {}, Path: {:?}", dtw.distance(), dtw.path());

Structs§

DynamicTimeWarping
Dynamic time warping computation using the standard dynamic programming method.

Enums§

Restriction

Traits§

Algorithm
Compute the dynamic time warping of two sequence.
Distance
An arbitrary distance between two objects.
ParameterizedAlgorithm
Compute the dynamic time warping of two sequence with initial hyper-parameters.