dtw

package
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2014 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package dtw provides support for Dynamic Time Warping (DTW) to align two time-series.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DTW

type DTW struct {
	ForwardStep      int
	BackwardStep     int
	Template         [][]float64
	CostTable        [][]float64
	BackTracePointer [][]int
}

DTW represents dynamic time warping that can be used to align two time-series.

func (*DTW) BackTrace

func (d *DTW) BackTrace() []int

BackTrace finds a minumum cost path.

func (*DTW) DTW

func (d *DTW) DTW(sequence [][]float64) []int

DTW peforms dynamic programming to align an input sequence to template.

func (*DTW) ObservationCost

func (d *DTW) ObservationCost(v []float64, index int) float64

TODO(ryuichi) use interface

func (*DTW) SetTemplate

func (d *DTW) SetTemplate(template [][]float64)

SetTemplate sets the template to align an input sequence.

func (*DTW) TransitionCost

func (d *DTW) TransitionCost(i, j int) float64

TODO(ryuichi) use interface

func (*DTW) Update

func (d *DTW) Update(v []float64)

Update performs one stop of forward recursion.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL