TrajectoryClustering icon indicating copy to clipboard operation
TrajectoryClustering copied to clipboard

Directly clustering of trajectories in python list

Open cyang-kth opened this issue 6 years ago • 2 comments

Thank you for this wonderful work!

I plan to cluster trajectories with my own data. However, the following test fails

https://github.com/bednarikjan/TrajectoryClustering/blob/13e4ec337ae9d393d0a05d2de6d2461a78e22b5c/clustering.py#L261-L270

Traceback (most recent call last):
  File "clustering.py", line 268, in <module>
    res = clust.clusterAgglomerartive(trajs, 2)
  File "clustering.py", line 131, in clusterAgglomerartive
    self.createDistanceMatrix()
  File "clustering.py", line 87, in createDistanceMatrix
    dist = self.modHausDist(r, c)
  File "clustering.py", line 51, in modHausDist
    t1pointsRelPos = [t1.getPrefixSum()[i] / t1.length() for i in range(len(t1))]
AttributeError: 'list' object has no attribute 'getPrefixSum'

I guess that some classes have been updated but the tests are not.

cyang-kth avatar Jun 01 '18 15:06 cyang-kth