# How to cluster a dataset in which each data point is composed of a set of 2-dimensional coordinates

I have a dataset with totally $$1000$$ scenarios, each of which is composed of $$5$$ users' coordinates $$(x_i,y_i), \forall i \in \{1,\dots,5\}$$. Now, based on users' coordinates, I want to cluster these $$1000$$ scenarios into 100 clusters. Specifically, if users in two scenarios keep proximal or same coordinates, such two scenarios should be grouped into the same cluster.

My idea is to create a matrix with $$1000$$ scenarios as rows and $$5$$ users' coordinates (i.e., $$5$$ x-coordinates and $$5$$ y-coordinates) as columns. The matrix will hence have $$1000$$ rows and $$10$$ columns. Then, I apply a clustering algorithm such as k-means to cluster these $$1000$$ scenarios into $$100$$ clusters.

My concern is how to define a distance or similarity metric based only on these coordinates. Can anyone help me with this? Any comments would be appreciated!

• There are many clustering algorithms: en.wikipedia.org/wiki/Cluster_analysis. You'll have to define a metric to measure what you mean by "similarity". I think the question is too broad to be usefully answerable in its current form. I suggest exploring those basic approaches, then if you get stuck, try to ask a more narrowly focused question based on your experience so far.
– D.W.
Sep 26, 2020 at 8:31
• Thank you for the reply, I have re-edited the problem statement. Any comments would be appreciated! Sep 27, 2020 at 0:14
• We can't tell you how to define a similarity metric, as that depends on your application, and only you will know what makes sense in your application. You'll have to figure out what notion of similarity is appropriate for your situation.
– D.W.
Sep 27, 2020 at 1:03