I have a dataset with four features:

  • the x coordinate
  • the y coordinate
  • the velocity magnitude
  • angle

Now, I want to measure the distance between two points in the dataset, taking into account the facts that the angle dimension is toroidal, and taking into account the difference in nature of the dimensions (2 of them are distances, one of them is velocity magnitude, and the other an angle).

What kind of distance function would suit this need?

If I have to go for an $L^p$ norm, can I determine which value of $p$ would be apt by some means?

Also, if you are aware, please, let me know how such problems have been solved in various applications.

  • $\begingroup$ Can you explain more about the nature of your data? Although I can imagine that the x and y coordinates and the angle could constitute a pose (e.g. of a robot) and the other feature would represent the magnitude of the velocity when that pose was recorded. I think that computing the distance between points will depend on what you want to achieve. Why do you want to compute the distance between observations in the dataset? $\endgroup$
    – nbro
    Commented Oct 4, 2020 at 21:39
  • $\begingroup$ The purpose is for clustering the data points. I want the metric to be robust enough such that if two points have their X and Y coordinates close and their velocity magnitude are almost same, yet their orientation is in the opposite direction, they should be treated to belong to different clusters $\endgroup$ Commented Oct 5, 2020 at 10:26
  • $\begingroup$ So, you want to take into account all 4 properties. $\endgroup$
    – nbro
    Commented Oct 5, 2020 at 10:28
  • $\begingroup$ Yes, all four properties should be considered. Even if the opposite is true, that is the data points are far apart in space but have similar orientation, they must be clustered into different clusters $\endgroup$ Commented Oct 5, 2020 at 10:29


You must log in to answer this question.

Browse other questions tagged .