I have a dataset containing GPS coordinates (latitude and longitude), a timestamp variable and a subject ID to identify different persons. What I want to explore is two things:
- Find frequent routes (or segments of route) that are shared among the subjects, for example people going from different places where their home is located and go to work taking the main highway.
- Find related subjects. Related to the previous one, which are the subjects that are similar (taking into account the time they use to commute, for example)
I looked at Dynamic Time Warping as shown here but it doesn't take into account that for example, subjects can come from different points (but share a segment).
Tried to implement K-Means, but I'm not sure how my centroids are defined (if I should take into account the time or not) as discussed in here, not sure if the similarity distance is making the correct assumptions in this case.
I looked at some papers on the mater but often they work with pre-defined points A and B and try to cluster, however they hint on some good strategies to transform the data.
I know I'm missing the name of the concept of what I'm looking for, maybe you can guide me on the algorithm/papers to review.
Thanks in advance.