Item Similarity with Location Feature I'm currently learning about Collaborative Learning and Content-based Recommendation.

One of the main things that is discussed in both methods is about calculating similarity between two users or two items. Commonly, similarity between two entity (each represented by a vector) can be calculated using Cosine similarity or other similarity coefficients.

One question that I haven't found the answer is about calculating similarity between two entities in which each has a feature that explains each entity's location.

Let's say, the entities in my data is about restaurants and each restaurant has several attributes such as


food price average
user rating/review score
location in $(\text{lat}, \text{long})$
etc.


For food price average or user rating, maybe it's still relevant to include them in cosine similarity function, but how about location–which is described in a tuple of real numbers? What's the best way to include distance between entities as a component in the similarity function?

Thanks!
Perhaps you could transform the latitude and longitude into spherical coordinates. In this coordinate system, the cosine of the angle between the vectors has a natural geometric interpretation.