# Agglomerative Clustering without knowing number of clusters

I want to perform agglomerative clustering, but I have no idea of number of clusters before hand. But I want that every cluster has at least 40 data points in it. How can I apply this to sklearn.agglomerative clustering? Should I use dendrogram and cut it somehow? I have no idea how to relate dendrogram to this and cutting it out. Any help will be appreciated!

• There is an awesome explanation here, that you may find useful. It has answers and examples on how to select the cut-off from the dendrogram, and code to implement it in python. joernhees.de/blog/2015/08/26/… – Sole G Dec 6 '17 at 14:29
• According to our answer guide: "Links to external resources are encouraged, but please add context around the link so your fellow users will have some idea what it is and why it’s there." – Mephy Dec 6 '17 at 21:02
• For a concise guide on input parameters used in various clustering algs, check the scikit-learn overview on clustering methods. – CubeBot88 Jun 25 '18 at 12:50

ELKI has some fairly interesting techniques to cut a dendrogram. Check the clustering.hierarchical.extraction (or so) package. If I remember correctly, some allow you to set a minimum size (but there will be a "noise" cluster with all the leftovers).