You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many people want to visualize the output of AgglomerativeClustering with a dendrogram. A recent update added an example how to do this (thanks, very useful in teaching!), but people still have to create the linkage matrix which is needed as input to the dendrogram-method in scipy by hand. It would be really cool to be able to plug-in the output of AgglomerativeClustering into dendrogram.
Describe your proposed solution
add a method which returns the linkage matrix
Describe alternatives you've considered, if relevant
An attribute like 'linkage_matrix' would be more in line with the workings of scikit-learn, but then, I guess, it would be calculated every time, even if people don't need the matrix. With large numbers of data points the computation time will increase and add to the runtime. So a methods sounds like a better solution
The text was updated successfully, but these errors were encountered:
Yes, I do. I am not talking about the bug, when you don't get any distances, but I am proposing a convenience function which returns the whole linkage matrix. At the moment, we have 3 of 4 columns with children_ and distances_, but we have to calculate the last column ourselves (see the example in the documentation of AgglomerativeClustering). The code is already there ...
Maybe it could be done as an attribute. Using the code from the documentation and creating synthetic data with 50.000 samples, it only takes 136 ms (on a Intel i7-6700 CPU / Windows / Python 3.7) to create the link matrix.
Describe the workflow you want to enable
Many people want to visualize the output of AgglomerativeClustering with a dendrogram. A recent update added an example how to do this (thanks, very useful in teaching!), but people still have to create the linkage matrix which is needed as input to the dendrogram-method in scipy by hand. It would be really cool to be able to plug-in the output of AgglomerativeClustering into dendrogram.
Describe your proposed solution
add a method which returns the linkage matrix
Describe alternatives you've considered, if relevant
An attribute like 'linkage_matrix' would be more in line with the workings of scikit-learn, but then, I guess, it would be calculated every time, even if people don't need the matrix. With large numbers of data points the computation time will increase and add to the runtime. So a methods sounds like a better solution
The text was updated successfully, but these errors were encountered: