FastDTW for Hand Gesture Pattern Recognition Example

I am using a tri-axis accelerometer to capture the movements of the hand. While coming through the existing solutions, I found that FastDTW is a suitable one for identifying the patterns of a time...

Java implementation of FastDTW for gesture recognition

I have an android application which is getting gesture coordinates (3 axis - x,y,z) from an external source. I need to compare them with coordinates which I have in my DB and determine whether...

creating TimeSeries object of fastdtw library

I am trying to use fastdtw library. The readme file explains how to create TimeSeries object: TimeSeries ts1 = TimeSeriesBase.builder() .add(0, 123.4) .add(1, 125) .add(2, 126.3) ...

Setting an array element with a sequence (MFCC+fastDTW, Python)

I want to build Voice command project by using RPi and python. I use MFCC and fastDTW to match that voice but I got this error and I have no idea how to fix it. Here the code... def fastdtw(x, y,...

Dynamic time warping with python (final mapping)

I need to align two sound signals in order to map one into the other (both signals corresponds to the same behavior). I try to implement the python code from:...

Python: Compute all possible pairwise distances of a list (DTW)

I have a list of items like so: T=[T_0, T_1, ..., T_N] where each of T_i is itself a time series. I want to find the pairwise distances (via DTW) for all potential pairs. E.g. If T=[T_0, T_1, T_2]...

How to QuickCheck an approximative algorithm?

I am testing an approximative algorithm (FastDTW) against the optimal solution by calculating the relative error and comparing that to the errors given in the paper [1]. Problem is that the errors...

Efficient pairwise DTW calculation using numpy or cython

I am trying to calculate the pairwise distances between multiple time-series contained in a numpy array. Please see the code below print(type(sales)) print(sales.shape) <class...

Swig with anaconda environment on Mac OS throws Fatal Python error: PyThreadState_Get: no current thread

Swig within anaconda environment on Mac OS throws Fatal Python error: PyThreadState_Get: no current thread I'm looking for a solution using swig and conda on Mac OS X. The code is based on this...

Parallel for loop over numpy matrix

I am looking at the joblib examples but I can't figure out how to do a parallel for loop over a matrix. I am computing a pairwise distance metric between the rows of a matrix. So I was doing: N, _...

Different results and performances with different libraries

I'm comparing the libraries dtaidistance, fastdtw and cdtw for DTW computations. This is my code: from fastdtw import fastdtw from cdtw import pydtw import fastdtw import array from timeit import...

different distance depending on input order using fastdtw in python

I want to find similarities between time-series and perform Dynamic Time Warping in python using fastdtw (https://github.com/slaypni/fastdtw/tree/master/fastdtw). The computed distance is...

Pandas rolling time window custom functions with multiple columns

I have timeseries data in a pandas DataFrame that looks like this : ts serial_number device_tp tp 2017-09-19T15:00:00.000Z 4ktpjlv ...

Dynamic Time Warping (DTW) for a large dataset with multiple features

I am new to DTW and was trying to apply the same for a dataset with ~700,000 rows and 9 features. I have two arrays (matrix) of the form, [ [0 1 0 0 0 0 0 0 0], [0 0 0 0 1 0 0 0 0], ... ...

audio recognition: resize audio examples to the same length

I have an audio dataset featured with MFCCs and it is a 1D array numpy file. There are 45K of examples in total, so it is a numpy file with 1 column and 45K row. In each row, there is a nested...

beam.io.ReadFromPubSub - ImportError: No module named iam.v1

I have a simple beam pipeline in which I am reading data from pub sub and writing to a file. I am running it on direct runner, the code is as follows: pubsub_data = ( p ...

ERROR: You must give at least one requirement to install -- when running: pip install --upgrade --no-binary hdbscan

I am trying to install hdbscan in my PC which runs Windows 10 and has installed Python 3.6. My first attempt failed: (base) C:\WINDOWS\system32>pip install hdbscan --user Collecting hdbscan ...

Clustering similar time series?

I have somewhere between 10-20k different time-series (24 dimensional data -- a column for each hour of the day) and I'm interested in clustering time series that exhibit roughly the same patterns...

ImportError: cannot import name 'downsample' while importing lasagne in python 3.6

I am getting the above error with the following import statements on Google Colab GPU: import argparse #import cPickle import _pickle as cPickle import time import os import numpy as np import...

Installing qiskit-aer through pip fails

I'm trying to install qiskit on Win10. I typed in my admin cmd : pip install qiskit It goes just fine for terra, ignis, and aqua. However, I have a C compiler problem when installing aer. Here's...

fast dtw as a loss function in a tensorflow model

I'm a PhD student but not an expert in deep learning nor Python, so sorry if my question is trivial. What I'm trying to do is to use the fast dtw (https://pypi.org/project/fastdtw/) as a loss...

How to apply/implement Dynamic Time Warping (DTW) or Fast Dynamic Time Warping (FastDTW) in python between 3 or more signals?

In time series analysis, dynamic time warping (DTW) is one of the algorithms for measuring similarity between two temporal sequences, which may vary in speed. Fast DTW is a more faster method. I...

Sudden Tensorflow / Keras Google Colab dependency problems `AttributeError: module 'tensorflow._api.v1.compat.v2' has no attribute '__internal__'`

I have running a machine learning model (Matterport's Mask R-CNN) in google colab for a couple of weeks. All of a sudden today I am unable to run any of my notebooks due to I think some kind of...

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...