Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7160959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T13:29:04+00:00 2026-05-28T13:29:04+00:00

I am doing some research into methods of comparing time series data. One of

  • 0

I am doing some research into methods of comparing time series data. One of the algorithms that I have found being used for matching this type of data is the DTW (Dynamic Time Warping) algorithm.

The data I have, resemble the following structure (this can be one path):

Path    Event      Time            Location (x,y)
  1       1       2:30:02             1,5
  1       2       2:30:04             2,7
  1       3       2:30:06             4,4
...
...

Now, I was wondering whether there are other algorithms that would be suitable to find the closest match for the given path.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T13:29:04+00:00Added an answer on May 28, 2026 at 1:29 pm

    If two paths are the same length, say n, then they are really points in an 2n-dimensional space. The first location determines the first two dimensions, the second location determines the next two dimensions, and so on. For example, if we just take the three points in your example, the path can be represented as the single 6-dimensional point (1, 5, 2, 7, 4, 4). If we want to compare this to another three-point path, we can compute either the Euclidean distance (square root of the sum of squares of per-dimension distances between the two points) or the Manhattan distance (sum of the per-dimension differences).

    For example, the boring path that stays at (0, 0) for all three times becomes the 6-dimensional point (0, 0, 0, 0, 0, 0). Then the Euclidean distance between this point and your example path is sqrt((1-0)^2 + (5-0)^2 + (2-0)^2 + (7-0)^2 + (4-0)^2 + (4-0)^2) = sqrt(111) = 10.54. The Manhattan distance is abs(1-0) + abs(5-0) + abs(2-0) + abs(7-0) + abs(4-0) + abs(4-0) = 23. This kind of a difference between the metrics is not unusual, since the Manhattan distance is provably at least as great as the Euclidean distance.

    Of course one problem with this approach is that not all paths will be of the same length. However, you can easily cut off the longer path to the same length as the shorter path, or consider the shorter of the two paths to stay at the same location or moving in the same direction after measurements end, until both paths are the same length. Either approach will introduce some inaccuracies, but no matter what you do you have to deal with the fact that you are missing data on the short path and have to make up for it somehow.

    EDIT:

    Assuming that path1 and path2 are both List<Tuple<int, int>> objects containing the points, we can cut off the longer list to match the shorter list as:

    // Enumerable.Zip stops when it finishes one of the sequences
    List<Tuple<int, int, int, int>> matchingPoints = Enumerable.Zip(path1, path2,
        (tupl1, tupl2) =>
            Tuple.Create(tupl1.Item1, tupl1.Item2, tupl2.Item1, tupl2.Item2));
    

    Then, you can use the following code to find the Manhattan distance:

    int manhattanDistance = matchingPoints
        .Sum(tupl => Math.Abs(tupl.Item1 - tupl.Item3)
                   + Math.Abs(tupl.Item2 - tupl.Item4));
    

    With the same assumptions as for the Manhattan distance, we can generate the Euclidean distance as:

    int euclideanDistanceSquared = matchingPoints
        .Sum(tupl => Math.Pow(tupl.Item1 - tupl.Item3, 2)
                   + Math.Pow(tupl.Item2 - tupl.Item4, 2));
    double euclideanDistance = Math.Sqrt(euclideanDistanceSquared);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just been doing some research into sql data services, and found out that
I'm doing some research into using log4net, and I found the IObjectRenderer interface interesting.
We have been doing some research into physically isolating the secure and non-secure sections
I've been doing some research into finally automating our Development builds and still have
I am doing some research into platform independent code and found mention of the
After doing some initial research into using Appfabric for caching, my understanding is that
I just started doing some research into Core Location and it seems that the
Im doing some preliminary research into the problem stated above. I have read a
Recently I've been doing some research into SEO and how URIs that use hyphens
Lately, I have been doing some research into cryptography. To get a better understanding

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.