简体   繁体   中英

how to cluster trajectories of x,y coordinates in r?

i'm trying to clustering trajectories. But this is not easy. The following stream data (spatio-temporal data) exists.

在此处输入图片说明

Here, we can see that each Object_ID has several x, y, and this is a trajectory. So I want to follow these points and get the following clusters:

在此处输入图片说明

I have already thought of many ways. For example, DBSCAN, TRACLUS, ... But if I use DBSCAN, I do not know how to put the input value. In other words, how do I put each object_ID line as an input value? (What form?) Or is there a way to put multiple coordinates of each Object_ID first?

object_1: [{x1, y1}, {x2, y2}, {y3, y3}, ... {xn, yn}],
object_2: [{x1, y1}, {x2, y2}, {y3, y3}, ... {xn, yn}],
object_3: [{x1, y1}, {x2, y2}, {y3, y3}, ... {xn, yn}],
.
.
.

And after I get cluster results, each cluster must have Object information.

Do you know anyone in r or python?

DBSCAN has no particular requirements on the data type.

You just need to be able to compute distances.

So organize the data as necessary for your time series distance function.

Is then try HAC first, then DBSCAN.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM