Questions tagged [dtw]

dtw means Dynamic Time Warping-type algorithms, which measure the similarity between time series with varying speeds.

Filter by
Sorted by
Tagged with
0 votes
0 answers
11 views

How to use dtw distance measure in pvclust

I am using the package dtwclust for time series clustering (hierarchical method "h"). I pasted below the relavant parts of the code I am using in R: clust.hier <- tsclust(transposed_data, ...
Aless_S's user avatar
0 votes
0 answers
20 views

Using tslearn for DTW K-means clustering with Sakoe-Chiba radius

I am using tslearn for dynamic time warping and I want to apply Sakoe-Chiba radius for the pairwise calculation. I am not sure if the below code is computed based on pairwise calculation for the time ...
Goldie's user avatar
  • 1
0 votes
2 answers
51 views

Time Series Clustering: problem to converting a dplyr data frame into a list of time series

I'd like to use time series clustering using the dtwclust package. The problem is the conversion of my data.frame to list of time series. All my blocks ID (named STAND) has 180 days in negative values ...
Leprechault's user avatar
  • 1,579
0 votes
0 answers
21 views

Motivate dynamic time warping using ccf or heatmap?

I have 20 time series each with different length and different time stamps (for example TS1 start 00:15 and ends 23:50 and TS2 start 00:30 and ends 23:00). I want to use dtw but i dont know how to ...
fskh94's user avatar
  • 1
0 votes
1 answer
108 views

Error in calculating Dynamic Time Warping

I am using this github codes (https://github.com/nageshsinghc4/-Dynamic-Time-Warping-DTW-/blob/main/Dynamic_Time_Warping(DTW).ipynb) to calculate Dynamic Time Warping. However, when run dtw_distance, ...
Jab's user avatar
  • 67
0 votes
0 answers
27 views

Clustering Time Series Data using dtwclust: Unable to Access Cluster Labels from Multiple Runs

I am working on a clustering analysis of time series data in R using the dtwclust package, specifically the tsclust function. My goal is to perform multiple runs of the clustering and extract cluster ...
Rackdos's user avatar
  • 11
0 votes
0 answers
40 views

DTW distance matrix - tsclust loading to long [duplicate]

im trying to find an answer but i still new to Dynamic time warping in r. I have a data set with over 20000 observation, 20 ID's and an outcome which was measured two and three times pe3r hour. my ...
fskh94's user avatar
  • 1
0 votes
0 answers
29 views

Different DTW Distance in FastDTW and dtaidistance

I just started reading about DTW, and decided to try two Python packages, fastdtw and dtaidistance. Consider the case of a multiclass timeseries classification problem (Classes are 0, 1, 3 and 4). ...
Murilo's user avatar
  • 555
-1 votes
1 answer
29 views

How to check similar shaped trends in the past data? Any option other than dynamic time wrapping?

For example, let's say we have data coming from a sensor at every 5 seconds on live basis, at the same time we have been collecting this data for last whole year. Now, we got a spike today from 5:00 ...
PARAS DHAMU's user avatar
0 votes
0 answers
41 views

Is it possible to calculate variance/standard deviation for a soft-DTW barycenter?

My database contains signals for which I calculate an "average signal" using Soft-DTW barycenter (https://github.com/mblondel/soft-dtw) in order to produce a representative signal of the ...
sasa ku's user avatar
0 votes
0 answers
40 views

Dynamic Time Warping with moving window

I have two time series, lets say X and Y with 127 and 64 observations in each respectively. I have applied DTW with global constraint to get the distance and then further used that distance to ...
Ali Inayat's user avatar
0 votes
0 answers
57 views

How to use DTW/fastdtw to transform input time series

I want to transform two time series of unequal length to equal lengths so that they can be compared. I came across fastdtw. Does it only compute the distance and the path between the two arrays? Can ...
ggoogle userr's user avatar
0 votes
0 answers
99 views

Dynamic Time Warping with KNN Classifier

I am attempting to construct a "big data" approach for time series classification using dynamic time warping (DTW) and knn clustering. https://archive.ics.uci.edu/ml/datasets/Heterogeneity+...
VGOAT's user avatar
  • 75
0 votes
1 answer
407 views

Similarity check of 2 audio files

I would like to ask a question regarding speech similarity check. Suppose I have 2 audio files that contain the same word, recorded by 2 different speakers, I would like to verify if these 2 audio ...
jey's user avatar
  • 1
0 votes
0 answers
32 views

is there a library in python for DTW that creates exact same result as matlab?

I am trying to replicate the result of a paper related to clustering time-series data. The original code is written in Matlab and I realized that available Python libraries for calculating DTW do not ...
Elahe Kamel's user avatar
0 votes
0 answers
69 views

Time series of cluster analysis spatiotemporal python

I want to cluster patterns based on three meteorological fields. Each field has the shape 31, 137, 181 (31 timesteps, 137 latitudes, 181 longitudes) and I want a spatial maps of clusters for each ...
scriptgirl_3000's user avatar
0 votes
1 answer
136 views

Constrained Dynamic Time Warping in R

I am comparing two time series in R using Dynamic Time Warping. The two time series reflect how two sets of raters responded to a stimulus over time. I'm finding, though, that the default DTW function ...
Dasha's user avatar
  • 1
1 vote
2 answers
89 views

How to create the least computation time dynamic time wrapping (DTW) algorithm for time series clustering in python

I have a list of time series data which contain of 1977 customers data. Each of them show 17,544 data points (hourly data for 2 years). I try to identify their cluster number and group them into same ...
Pradya Panyainkaew's user avatar
0 votes
0 answers
21 views

Can tslearn be used to Perform Multidimensional Subsequence DTW

I am trying to use dtw_subsequence_path to get the distance and path between two variable length 9-dimensional time series. I have the time series stored in numpy arrays of shapes (9, 528) and (9, ...
Jamie's user avatar
  • 555
0 votes
1 answer
223 views

Different results in R's `dtw` and Python's `dtw-python`

I am exploring some alternatives to compute Dynamic Time Warping (DTW) distances in Python. And I am struggling with the limited documentation about the packages I am finding... I have explored ...
hamagust's user avatar
  • 748
0 votes
0 answers
21 views

How to use Time Wrapping (DTW) as input data

How to use DTW as input data, I have the following data: from dtaidistance import dtw from dtaidistance import dtw_visualisation as dtwvis import random import numpy as np X = np.array([ [...
stack offer's user avatar
0 votes
0 answers
31 views

Why DTW (dynamic time warping) so computationally intensive

Why is DTW so much more computationally intensive compared to euclidean distance metric? Did not find much in literature. Thank you.
julianff1's user avatar
0 votes
0 answers
33 views

How to summarise multiple arrays of time series data based on the data deviation in python?

I have multiple arrays of varying time series data, all starting at the same place but having different outcomes. I want to summarise them as a single plot highlighting the most typical routes taken, ...
seb mikl's user avatar
0 votes
0 answers
87 views

dynamic time warping length limit

I have a sequence of 15 values. I am looking for the 50 most similar sequences in my time series. She expressed that DTW finds sequences too short 3-6 values. Is it possible to limit the k best ...
matan's user avatar
  • 451
0 votes
0 answers
28 views

Cross correlaing two data sets to find similarity

I have data sets of Heart Rate Variability data and i am trying to determine if the data collected each day is similar or related for data collected the next day. Please how can i go about this. I am ...
Eniola Adewumi's user avatar
0 votes
0 answers
61 views

How come my connecting DTW-Python lines aren't showing up in my time-series graphs?

I am trying to use dtw-python inside of a jupyter notebook in order to graph the Dynamic Time Warping between two time-series graphs. I have successfully imported dtw-python into my jupyter notebook, ...
Austin Saenz's user avatar
0 votes
0 answers
59 views

How to append DTW clusterings results from tslearn into a pandas DataFrame

I'm currently learning how to use the python package tslearn for time series clustering. I have time series for various products I would like to cluster together and used the following code: # DBA-k-...
import_numpy's user avatar
1 vote
1 answer
501 views

How to compute DTW distance more faster in massive data set

I try to calculate the distance between time series data using dtw in Python. There are 10487 time series data, and each time series data has 37 data points. I want to create a distance matrix of size ...
정재현's user avatar
0 votes
0 answers
175 views

Using tsclust from dtwclust R library in Python. How do I access cluster?

I'm translating a R code to Python code and I need to implement a hierarchical time series clustering with dtw distance for time series of different lengths. The only solution that I find is to use ...
Giorgia Lotta's user avatar
0 votes
2 answers
219 views

How to plot with dtaidistance

I tried an example using dtaidistance and dtw, but it did not plot the result. from dtaidistance import dtw from dtaidistance import dtw_visualisation as dtwvis import numpy as np s1 = np.array([0., 0,...
Skobo Do's user avatar
1 vote
1 answer
495 views

Dynamic Time Warping Classification using tslearn

I am having some problem while implementing DTW classification with tslearn library . Specially while training the model. I have multiple time series data of variable length and multiple dimensions. ...
memonj12's user avatar
0 votes
1 answer
232 views

Python: how to find the offset that minimizes the euclidean distance between two series?

I have two non-identical series where one is lagging the other. I want to find the x_axis offset that minimizes the Euclidean distance between the two series. df = pd.DataFrame({'a':[1,4,5,10,9,3,2,6,...
finstats's user avatar
  • 1,359
0 votes
0 answers
36 views

Add new dataframes(with different number of rows) generated from a loop side by side without losing any data

Here is my data - Here is my code - new=[] for i in range(1,len(dfnew.columns)-1, 1): x = np.array(df.iloc[:, i].fillna(0)) y = np.array(df.iloc[:, i+1].fillna(0)) distance,path = fastdtw(...
Zlatan's user avatar
  • 35
0 votes
1 answer
202 views

How to parallalise partitioning around medoids (PAM) using a precalculated distance matrix

I am trying to cluster income trajectories using a large longitudinal dataset containing participants’ yearly reported incomes. I have chosen to calculate distances between the trajectories using ...
Misc584's user avatar
  • 357
0 votes
1 answer
344 views

how can I perform clustering on a dataset including time series and discrete point variables?

I am trying to perform clustering on a dataset including time series (e.g. sensor recording over a few seconds) and discrete valued variables (e.g. age). I have already tried PCA to combine the ...
YoungResearcher's user avatar
-1 votes
1 answer
67 views

How to do slidingwindow and DTW in r

i have multivariate time series data and want to do sliding window and dtw for graph matching : there is any example i can refer . Thank you in advance
Rosita binti Husain  Faculty o's user avatar
0 votes
1 answer
338 views

Time Series clustering: Changing warping window for Dynamic time warping

I'm working on the same type of data and i want to classify the times series to find clear pattern of use. My data is collected from clients of a telecom company, and we want to detect pattern of the ...
Ilias ETTOUKI's user avatar
0 votes
0 answers
100 views

Improve efficiency of distance matrix calculation for time series with dtw in big dataset with python

I'm trying to improve the distance matrix calculation of all possible paris in a dataset of 109489 elements. All the elements on the column are time series (stored as lists) and the metric I'm using ...
josseossa's user avatar
0 votes
3 answers
204 views

Trying to convert pandas df to np array, dtaidistance computes list instead

I am attempting to compute the distance matrix for an ndarray that I have converted from pandas. I tried to convert the pandas df currently in this format: move_df = movement 0 [4, 3, 6,...
learningtoprogram123's user avatar
0 votes
0 answers
1k views

Trying to run and plot dynamic time warping of two arrays in python

I am trying to understand how to implement dynamic time warping (DTW) to compare time series curves in python. I am trying to take the curves of two arrays, and measure the distance between them, and ...
LostinSpatialAnalysis's user avatar
1 vote
1 answer
541 views

How to find Optimal K for each group in data with Kmeans clustering

I have a dataset the has 10 different groups and sales for 3 weeks in a year. I am trying to run a clustering algorithm that clusters each of the groups based on how many items are present in each ...
Adelore Similoluwa Gloria's user avatar
0 votes
1 answer
963 views

Getting the error "dtw() got an unexpected keyword argument 'dist'" while calculating dtw of 2 voice samples

I am getting the error "dtw() got an unexpected keyword argument 'dist'" while I'm trying to calculate the dtw of 2 wav files. I can't figure out why or what to do to fix it. I am attaching ...
leopold's user avatar
1 vote
0 answers
378 views

Dynamic Time Warping (dtw): why do some Rabiner-Juang step patterns work whilst others don’t

I am trying to cluster time series data from a longitudinal survey that includes participants’ yearly reported incomes. These income trajectories vary in length, so dynamic time warping seems like an ...
Misc584's user avatar
  • 357
0 votes
0 answers
118 views

Is there a way to approximately estimate how long DTW distance matrix calculation will take?

I have a relatively large time-series data with 10000 observations (rows) and 200 variables (columns) in an R dataframe. I want to run a clustering algorithm on my data, specifically Dynamic Time ...
bird's user avatar
  • 2,972
0 votes
2 answers
805 views

How to create a pairwise DTW cost matrix?

I am trying to create a pairwise DTW (Dynamic Time Warping) matrix in python. I have the below code already, but it is incorrect somehow. My current output is a matrix full of infinity, which is ...
Blueboots's user avatar
5 votes
2 answers
2k views

install dtaidistance -> Exception: The compiled dtaidistance C library is not available

I try to run dtaidistance but when running the following code according example : from dtaidistance import dtw import numpy as np timeseries = np.array([ [0., 0, 1, 2, 1, 0, 1, 0, 0], [0., 1,...
Adler Müller's user avatar
5 votes
0 answers
1k views

How do you align multiple time series (not just 2) in python using DTW - Dynamic Time Warping?

I found these two articles discussing aligning multiple 'n' number of time series using dynamic time warping or DTW. How to apply/implement Dynamic Time Warping (DTW) or Fast Dynamic Time Warping (...
narnia649's user avatar
  • 371
0 votes
1 answer
168 views

speedup dtaidistance key function with numba

The DTAIDistance package can be used to find k best matches of the input query. but it cannot be used for multi-dimensional input query. moreover, I want to find the k best matches of many input ...
user8641707's user avatar
0 votes
1 answer
500 views

Dynamic time warping for a long time series signal with a shorter reference time series signal in fastdtw python package

I have the two following time series signals: import numpy as np x = np.cos(2*np.pi*np.power(3*(np.linspace(1, 1000, 1000))/1000, 2)) y = np.cos(2*np.pi*(9*(np.linspace(1, 399, 399))/400)) so x and y ...
Mohammad's user avatar
  • 163
0 votes
1 answer
947 views

Dynamic time warping in C [closed]

So I can find alot of guides on DTW for python, and they work as they should. But I need the code translatet into C, but it's over a year since I've written C code. So in C code I have these two ...
WRD BAC's user avatar