/Users/bernard/b20/bsoft/include/cluster.h(3)

NAME
/Users/bernard/b20/bsoft/include/cluster.h - Header file for clustering functions.

SYNOPSIS

#include 'Matrix.h'

  Functions
long * k_means (long n, float *data, long k)
Generate clusters using a K-means algorithm.
long * affin_prop_clustering (Matrix s, long maxit, long convit, double lambda, long &ncluster)
Generate clusters from a similarity matrix using affinity propagation.

Detailed Description

Header file for clustering functions.

Author:
    Bernard Heymann

Date:
    Created: 20070417

    Modified: 20170724

Definition in file cluster.h.

Function Documentation

  long* affin_prop_clustering (Matrix s, long maxit, long convit, double lambda, long & ncluster)

Generate clusters from a similarity matrix using affinity propagation.

Parameters:
    s n x n similarity matrix.
    maxit maximum iterations.
    convit convergence iterations.
    lambda damping factor.
    &ncluster number of clusters.

Returns:
    long* vector of cluster memberships.

    Frey, B. J. and D. Dueck (2007). "Clustering by passing messages between
    data points." Science 315(5814): 972-6.
    The clustering algorithm proceeds iteratively for a given maximum iterations.
    If the cluster solution does not change for a given number of iterations
    (convit), convergence is assumed and the function finishes.
    The damping factor should be ~0.5, or at least between 0.1 and 0.9.
    For larger damping factors, more convergence iterations are required.
    The diagonal of the matrix should be set to preferences for exemplars
    (typically the average or median of the similarities).

Definition at line 102 of file cluster.cpp.

  long* k_means (long n, float * data, long k)

Generate clusters using a K-means algorithm.

Parameters:
    n number of data elements.
    *data floating point array.
    k number of classes.

Returns:
    long* vector of cluster memberships.

Definition at line 28 of file cluster.cpp.

Author

Generated automatically by Doxygen for Bsoft from the source code.