May 2020
Intermediate to advanced
530 pages
17h 8m
English
The spectral clustering algorithm in the Dlib library is implemented in the spectral_cluster function. It takes the distance function object, the training dataset, and the number of clusters as parameters. As a result, it returns a container with cluster indices, which have the same ordering as the input data. In the following sample, the object of the knn_kernel type is used as a distance function. You will find its implementation in the samples provided with the book. This knn_kernel distance function object estimates the first k-nearest neighbor (KNN) objects to the given one. These objects are determined with the KNN algorithm, which uses the Euclidean distance for the distance measure, as follows:
typedef ...
Read now
Unlock full access