Skip to content

Instantly share code, notes, and snippets.

View elmelik's full-sized avatar

Kim Jung Wook elmelik

View GitHub Profile
@elmelik
elmelik / python-dtw.py
Created May 10, 2019 04:32 — forked from socratescli/python-dtw.py
Simple DTW(Dynamic time wrapping) in python
# -*- coding: utf-8 -*-
# An pure python implemetation of Dynamic Time Warpping
# http://en.wikipedia.org/wiki/Dynamic_time_warping
class Dtw(object):
def __init__(self, seq1, seq2, distance_func=None):
'''
seq1, seq2 are two lists,
distance_func is a function for calculating
@elmelik
elmelik / python-dtw.py
Created May 10, 2019 04:32 — forked from socratescli/python-dtw.py
Simple DTW(Dynamic time wrapping) in python
# -*- coding: utf-8 -*-
# An pure python implemetation of Dynamic Time Warpping
# http://en.wikipedia.org/wiki/Dynamic_time_warping
class Dtw(object):
def __init__(self, seq1, seq2, distance_func=None):
'''
seq1, seq2 are two lists,
distance_func is a function for calculating