0
votes

I have a dataset of circles with center(x,y) and radius(r). Need to cluster the circles with the position is close. Then I have a point need to find the closest cluster.

index x   y  r
0     0   0  3
1     1   2  2
2     9   5  1
3     10  6  1
4     100 8 20

For example, by index the clusters would be (0,1),(2,3),(4). I think this part should developed by clustering algorithm, but have no idea for which algorithm. And for the next step - find the closest cluster, consider the time complexity, what is the best way to find it?

1
looks like a case of k-nn. - futureExpert

1 Answers

0
votes

You can use K-Means clustering, which is an unsupervised technique. K is the hyperparameter here, It denotes the number of clusters that you wanna find in your data, So you need to set the value of K before fitting the model on your data (as you can tell If you're not sure how many clusters could be there, then you need to set different values of K and see what works best for you). For your question on time complexity, well in ML we hardly think of time complexity (not strictly true) as we often want to trade off time for better accuracy of minimization of loss.

How K-means Works:

K-means Algorithm

The best part about it is you can very easily try this method and see how it performs using Scikit Learn library, It's pretty easy as you don't have to code much. You may go through the docs here - sklearn.cluster.KMeans