Form k clusters using distance to representative objects (medoids) More...
#include <vcl_vector.h>
#include <vcl_cassert.h>
#include <vcl_iostream.h>
#include <vbl/vbl_array_2d.h>
Go to the source code of this file.
Classes | |
class | bsta_k_medoid |
Form k clusters using distance to representative objects (medoids)
A clustering algorithm based on the distance within the cluster to a representative element and the total distance between representatives. The input is a n x n matrix of pairwise distances The output is a set of k representatives (medoids) that minimize the sum of the average distance from each medoid to other elements closest to the medoid and the average distance between medoids.
For k = 1 the medoid would be the element that minimizes the average distance to all other elements. The elements are indexed from 0 to n-1.
Fairly computationally expensive: The space requirement is n x n The time is k x (n - k) x (n - k) x number of swaps to minimize total distance. There might be on the order of k swaps (or worse).
Definition in file bsta_k_medoid.h.