dotnet / dotnet/machinelearning
[Clustering] Create/Add an additional trainer for Clustering: Affinity Propagation
- Dominant language
- C#
- Stars
- 9.4k
- Forks
- 2k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 11
Description
In ML.NET we currently only have the [KMeansTrainer](https://docs.microsoft.com/en-us/dotnet/machine-learning/resources/tasks#clustering).
The main challenge with that clustering trainer is that you need to provide the number of clusters to use (numberOfClusters param also known as k), and that's a very difficult number to figure out. THere are methods that can help, like the Elbow method, but still it is a challenge.
There are other clustering algorithms that doesn’t require in input the number of expected clusters like the **Affinity Propagation** algorithm.
It is relatively new (Presented in 2007) and it works by measuring the affinity between data items.
Further info about it:
https://towardsdatascience.com/unsupervised-machine-learning-affinity-propagation-algorithm-explained-d1fef85f22c8
The function that measures affinity between data items is one of the hyperparameters of the algorithm.
**Affinity Propagation is an unsupervised machine learning algorithm that is particularly well suited for problems where we don’t know the optimal number of clusters.**
As an additional note, consider that K-means was first proposed for application in the field of statistics back in 1955.
I suggest that, when possible, we implement and offer this additional clustering algorithm, especially when we currently just have one algorithm for Clustering (KMeansTrainer).
Contributor guide
Assessment
This issue has not been assessed yet.