Skip to content
Advertisement

How to get the centroids in DBSCAN sklearn?

I am using DBSCAN for clustering. However, now I want to pick a point from each cluster that represents it, but I realized that DBSCAN does not have centroids as in kmeans.

However, I observed that DBSCAN has something called core points. I am thinking if it is possible to use these core points or any other alternative to obtain a representative point from each cluster.

I have mentioned below the code that I have used.

JavaScript

I am happy to provide more details if needed.

Advertisement

Answer

Why don’t you estimate the centroids of the resulted estimated clusters?

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement