How to implement a sklearn -AgglomerativeClustering from clusters?
How to implement a sklearn -AgglomerativeClustering from clusters?
I'd like to perform a "mixed" unsupervised clustering which uses first a KMeans algorithm to generate a certain number of first small and homogeneous clusters and THEN apply a hierarchical clustering on these clusters I get from Kmeans.
I used cluster.Kmeans from scikit-learn for the first part, and I have my clusters but then I don't know how to use the AgglomerativeClustering function from sklearn so that it can go from those clusters.
Any ideas?
Thank you !
1 Answer
1
You also get the labels from KMeans.
These give you the partitions.
Just see the manual.
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
Welcome to SO; please go through the help pages, and be sure to read What topics can I ask about here? and How do I ask a good question?. We are most willing to help, but we cannot do so unless you share what you have tried so far, what exactly is your problem, and what is the desired result...
– desertnaut
Jun 28 at 13:59