As a newbie in Machine Learning, I have a set of trajectories that may be of different lengths. I wish to cluster them, because some of them are actually the same path and they just SEEM different due to the noise.

In addition, not all of them are of the same lengths. So maybe although Trajectory A is not the same as Trajectory B, yet it is part of Trajectory B. I wish to present this property after the clustering as well.

I have only a bit knowledge of K-means Clustering and Fuzzy N-means Clustering. How may I choose between them two? Or should I adopt other methods?

Any method that takes the "belongness" into consideration? (e.g. After the clustering, I have 3 clusters A, B and C. One particular trajectory X belongs to cluster A. And a shorter trajectory Y, although is not clustered in A, is identified as part of trajectory B.)

=================== UPDATE ======================

The aforementioned trajectories are the pedestrians' trajectories. They can be either presented as a series of (x, y) points or a series of step vectors (length, direction). The presentation form is under my control.


1 Answer 1


I do not know what you mean exactly by 'trajectory'. But what I understand is a one-dimensional vector with numeric values.

My suggestion here is to use Dynamic Time Warping (henceforth, DTW), a method able to 'align' two one-dimensional signals. Then, if you want to measure belongness, DTW provides you with several metrics to state to what extent two signals are similar.

In addition, you can perform clustering based on the metrics provided by DTW instead of using the standard metrics involved whether in Fuzzy C-means or $k$-means.

  • $\begingroup$ Sorry for the confusion caused. Please kindly refer to the updated question. :) $\endgroup$ Commented Sep 16, 2013 at 7:36
  • 1
    $\begingroup$ Then, I confirm my suggestion. You may use DTW on your data by using a polar transformation $r = \sqrt{x^2+y^2}$ for example, or you can calculate the centroid of each trajectory and calculate the distance of that trajectory to its corresponding centroid using afterwards that distance vector for the alignment. $\endgroup$
    – a.desantos
    Commented Sep 16, 2013 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.