January 2019
Intermediate to advanced
378 pages
8h 27m
English
Next, however, I want to introduce another model, which uses a completely different algorithm. This algorithm is called dynamic time warping. What it does is give you a metric that represents the similarity between two time series:
!pip install fastdtw
from scipy.spatial.distance import euclidean from fastdtw import fastdtw
def dtw_dist(x, y):
distance, path = fastdtw(x, y, dist=euclidean)
return distance
Read now
Unlock full access