1
$\begingroup$

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!

$\endgroup$
  • $\begingroup$ 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/… $\endgroup$ – Sole G Dec 6 '17 at 14:29
  • $\begingroup$ 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." $\endgroup$ – Mephy Dec 6 '17 at 21:02
  • $\begingroup$ For a concise guide on input parameters used in various clustering algs, check the scikit-learn overview on clustering methods. $\endgroup$ – CubeBot88 Jun 25 '18 at 12:50
1
$\begingroup$

A minimum cluster size will not generally be satisfiable in hierarchical clustering. Instead, you have to expect many clusters with just a single point.

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).

| improve this answer | |
$\endgroup$
1
$\begingroup$

If you don t know the number of clusters, i encourage you to look at those density based algorithm : Mean Shift, DBSCAN, OPTICS. They don t presume of the cluster number and are able to find random shape clusters.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.