Which criteria to use to determine cluster centroids? I have 3-dimensional datapoints I want to cluster. The idea is to do this in an unsupervised fashion with neural networks for a research project. To see how the system performs I'm trying with datasets whose original classes I already know.
At first, I train a Kohonen network (SOM) to find potential cluster centroids. Then I do some calculations regarding the datapoints density in the positions where the potential centroids are located. Thus, I can discriminate some of them, and go from 40 candidates to around 10.
This is when I don't know how to proceed. I have to use some criteria to determine which centroids correspond to the same cluster, and how many clusters are there. I'm posting two examples of 2-dimensional projections of the datasets I'm using to try the program:


The small colored dots represent datapoints of different clusters, and the big black dots are the potential centroids I've found using the SOM and the density discrimination.
Although I would prefer an approach that doesn't require to set the number of clusters a priori, I'll take a solution of that kind as well. Any ideas?
 A: Since you already know the clusters your job is easy, as you can use an external clustering evaluation method (i.e. metrics that use the class labels to evaluate your clusters) to see how well your clustering algorithm has performed. If you are using python, most of scikit-learn's clustering metrics are of this type.
If you want to approach the problem in an unsupervised nature, without taking into account your classes' labels (i.e. internal evaluation), I would suggest doing one of the following:


*

*You could use a clustering method like the ones that you are using where you have to set the number of centroids a priori (e.g. k-means, SOM) and make several runs with different values of the number of centroids (I'll refer to this as $k$). For each run you could use a metric to evaluate your clustering and finally select the value of $k$ that, according to the metric, clusters your data the best. Be careful not to use a metric that takes into account the inter-cluster variance (e.g. inertia, Calinski Harabaz score) as they produce better scores for larger values of $k$. I would suggest using a silhouette score for your evaluation. This metric attempts to maximize the cohesion of each cluster and the separation between different clusters.

*You could use another form of clustering (e.g. hierarchical clustering). The benefit of this approach is that you don't have to select the number of clusters or the size of the map. You could use a hierarchical clustering algorithm to find out how many clusters you have in your dataset. 
Now regarding your first question, the most common way of finding which SOM centroids belong to the same cluster, is actually clustering your SOM's map. Because your SOM attempts to cluster your data while preserving the topology of your input. Many times the map will match your input data's distribution, but won't be much useful for clustering. Running a clustering algorithm (e.g. k-means) on your map's neurons will also cluster your data. Look at this example (in python) to see how it's done.
A: Why Kohonen SOM first?
If you consider your first example, the green "centers" are both not very good. By stacking another method on top, it certainly doesn't get much better.
On each of these data sets, I believe that density based clustering (in particular OPTICS and HDBSCAN*) should work very well.
Also try GMM and choose the number of clusters by BIC, AIC or similar.
