ActivityDiary icon indicating copy to clipboard operation
ActivityDiary copied to clipboard

Add Location Condition

Open ramack opened this issue 7 years ago • 2 comments

To make real use of the location support we should add a LocationCondition.

It could come in different flavors:

  • [ ] distance to average location for an activity
  • [ ] distance to closest start location, where the start locations are determined by clustering the start locations into a configurable amount of location clusters with a default of 4

Clustering the start locations could be done by fitting Gaussian 2D bells into the coordinates (take care about the fact that longitude is not as nicely encoded as latitude 1° lat is always around 111 km while for the lon this holds only at the equator.

Another approach could be to just cluster iteratively starting with the first n point as mean of the n clusters and on adding a new point to a cluster adjusting its center point. While at the end decide whether cluster shall be merged.

3rd idea: dynamically decide about the number of clusters: start with a single cluster with sigma = 30m and mean the first location. on adding a new location check whether it fits into one of the existing clusters with respect to their current mean and variance, if so put it there and recalculate the two, if not add a new cluster and put this sinlge location into it.

Those clustering algos could be quite dependent on the order of the data, so it might be worth rerunning several epochs of clustering, with pre-initialized clusters?

ramack avatar Jul 07 '18 21:07 ramack

Maybe do clustering with an iterative clustering to start with one cluster per point and sucessively merge clusters until the distance of the clusters gets too big (configurable?).

Clustering is meaningful for start, average and end location. (For end there is no use so far, but with #182 end location of the current activity could become an interesting feature for the next activity)

ramack avatar Aug 29 '18 18:08 ramack

Maybe do clustering with an iterative clustering to start with one cluster per point and sucessively merge clusters until the distance of the clusters gets too big (configurable?).

Clustering is meaningful for start, average and end location. (For end there is no use so far, but with #182 end location of the current activity could become an interesting feature for the next activity)

ramack avatar Aug 29 '18 20:08 ramack