Open danomics-cam opened 4 years ago
The function passed as dist
parameter is used to calculate distances between each sample of X and Y. Therefore, as long as the dist
function can compute distances between two samples, it is not a problem that each sample has multiple dimensions.
@slaypni Hi, thanks for the great package.
I have a couple of points to clarify. In the original paper, DTW is measured between just 2 two-time series. But in the example given in the documentation, (5,2) and (3,2) shape data (x,y) are used to get the DTW distance.
Can you please explain how can we use the metric. I could not find the documentation for this in the repository.
(original paper mentioned in the repo: https://www.semanticscholar.org/paper/FastDTW%3A-Toward-Accurate-Dynamic-Time-Warping-in-Salvador-Chan/05a20cde15e172fc82f32774dd0cf4fe5827cad2)
Thanks.
Please take a look at the test code. There are 1d and 2d examples. https://github.com/slaypni/fastdtw/blob/master/tests/test_fastdtw.py
I appreciate your package - it has made my life much easier. However, I have a question that I was hoping you could resolve: In the case of: X being an array of size (n,1), and Y being an array of size (m,1), where m/n are number of samples,
What if I had arrays of: X being size (n,2), and Y being size (n,2).
Example of use case being if I have two related time series measurements such as machine vibration frequency and machine operating temperature. Both are distinct measurements, and when doing a manual correlation you can better match events when using both indicators in tandem than just one.
The code certainly runs in both scenarios, and outputs unique paths when I run just component 1 vs. just component 2 vs. both 1 and 2 at same time.
However, with existing documentation it's hard to understand the workings of what is going on.