dotnet / dotnet/machinelearning

Support for Hierarchical Clustering

Open
#5,725 0 comments 1 reaction 0 assignees View on GitHub
area-Trainers enhancement Priority:2
Dominant language
C#
Stars
9.4k
Forks
2k
Avg merge
2d 20h
Merged PRs (30d)
11

Description

### Issue

This issue is based on #4961.
It would be nice to see support for Hierarchical Clustering besides the KMeans implementation in ML.NET.
An open source implementation of the AGNES algorithm [Kaufman & Rousseeuw, 1990] already exists in this open-source library [Aglomera](https://github.com/pedrodbs/Aglomera) that's licensed under the MIT license.

> Currently, Aglomera.NET implements program AGNES (AGglomerative NESting) of [Kaufman & Rousseeuw, 1990], i.e., the bottom-up approach, the It supports different linkage criteria and also provides several metrics to perform internal and external evaluation of clustering results. The results of clustering can be exported to a Json file to be visualized as a dendrogram in Dendrogram Viewer, an interactive web-application using D3.js.

Based on the description of Hierarchical Clustering by Aglomera ...

> The clustering result is a list containing the cluster-set and the corresponding dissimilarity / distance at which it was created at each step of the algorithm. The result is organized in a hierarchical form, i.e., where each cluster references either the two parents that were merged for its creation (in the agglomerative approach), or the two children resulting from splitting the cluster (in the divisive approach). Due to their hierarchical nature, clustering results can be visualized via a dendrogram.

... the expected result of this additional Model would not be a fixed amount of clusters (as with KMeans), but rather a tree containing the d.
The actual clusters can then be obtained by cutting the three at a certain height.
Besides visualizing the hierarchical dependencies between clusters, this would give the developer more control regarding the amount of clusters, since this can be decided after the tree was calculated.

References

1. Kaufman, L., & Rousseeuw, P. J. (1990). [Finding groups in data: an introduction to cluster analysis](https://books.google.com/books?hl=en&lr=&id=YeFQHiikNo0C&oi=fnd&pg=PR11&ots=5ApcG5OEwC&sig=Sx5Bhqfaymzg1U9aRQVIFxmqiHY). John Wiley & Sons.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.