langholz/dtw

语言: JavaScript

git: https://github.com/langholz/dtw

动态时间扭曲javascript实现
Dynamic time warping javascript implementation
README.md (中文)

DTW

动态时间扭曲javascript实现

安装

npm install dtw

测试

可以从命令行调用测试套件,如下所示:

npm test

用法

var DTW = require('dtw');
var s = [1,1,2,3,2,0];
var t = [0,1,1,2,3,2,1];
var dtw = new DTW();
var cost = dtw.compute(s, t);
var path = dtw.path();
console.log('Cost: ' + cost);
console.log('Path: ');
console.log(path);

文档

  • API参考

未来的工作

  • 实现快速(O(n))和稀疏版本。

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

DTW

Dynamic time warping javascript implementation

Installation

npm install dtw

Tests

The test suite can be invoked from the command line like this:

npm test

Usage

var DTW = require('dtw');
var s = [1,1,2,3,2,0];
var t = [0,1,1,2,3,2,1];
var dtw = new DTW();
var cost = dtw.compute(s, t);
var path = dtw.path();
console.log('Cost: ' + cost);
console.log('Path: ');
console.log(path);

Documentation

Future work

  • Implement fast (O(n)) and sparse versions.