<p>I have a dataset with four features:</p>
<ul>
<li>the x coordinate</li>
<li>the y coordinate</li>
<li>the velocity magnitude</li>
<li>angle</li>
</ul>
<p>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).</p>
<p>What kind of distance function would suit this need?</p>
<p>If I have to go for an <span class="math-container">$L^p$</span> norm, can I determine which value of <span class="math-container">$p$</span> would be apt by some means?</p>
<p>Also, if you are aware, please, let me know how such problems have been solved in various applications.</p>

CC BY-SA 4.0
2020-10-04T21:39:02.057Z
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?
nbro
CC BY-SA 4.0
2020-10-05T10:26:41.220Z
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
Manish Kausik Hari Baskar
CC BY-SA 4.0
2020-10-05T10:28:55.100Z
So, you want to take into account all 4 properties.
nbro
CC BY-SA 4.0
2020-10-05T10:29:39.510Z
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
Manish Kausik Hari Baskar
<datasets><objective-functions><linear-algebra>
How to find distance between 2 points when dimensions are all of different nature?
Manish Kausik Hari Baskar
# How to find distance between 2 points when dimensions are all of different nature?

(Asked by: username_0 on 2020-10-03)

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.

**Tags:** datasets, objective-functions, linear-algebra

> **Comments:**
> **username_1**: 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?  
> **username_0**: 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  
> **username_1**: So, you want to take into account all 4 properties.  
> **username_0**: 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  

---

## 0 answers

