The Dlib library provides the following clustering methods: k-means, spectral, hierarchical, and two more graph clustering algorithms: Newman and Chinese Whispers.
Examples of using the Dlib library for dealing with the clustering task samples
K-means clustering with Dlib
The Dlib library uses kernel functions as the distance functions for the k-means algorithm. An example of such a function is the radial basis function. As an initial step, we define the required types, as follows:
typedef matrix<double, 2, 1> sample_type;
typedef radial_basis_kernel<sample_type> kernel_type;
Then, we initialize an object of the kkmeans type. Its constructor takes an object that will define cluster centroids as input parameters...