KMEANS_LNK(1)

NAME
kmeans_lnk - Binary Splitting Kmeans Clusterer

SYNOPSIS
A program for finding cluster centers for the input data using a binary splitting version of K-means clustering.

kmeans_lnk [ -cluster_by_class ] [ -ncenters n ]
[ -ncenters_list n[,n]... ] [ -split_percentage x ]
[ -add_random_offset ] [ -max_iteration n ]
[ -stop_percentage x ] [ -reduce_step n ]
[ -classifier_options ]

EXAMPLE
kmeans_lnk -train -ncenters 16 -pathdata $LNKHOME/data/class \
-finput vowel.train -fdescribe vowel.defaults \
-fparam kmeans.param -npatterns 338

DESCRIPTION
Kmeans_Lnk training starts with a single cluster with its center at the mean of the data. This cluster is split in two and the means of the new clusters are iteratively trained. These two clusters are then split and the process continues until the requested number of clusters has been trained. If the number of clusters requested is not a power of two, the nearest power of two above the request is used. Then, the clusters that will least affect the total reconstruction squared error in the means are removed and the remaining clusters are iteratively trained until the requested number has been reached.

When splitting a cluster, the initial means of new clusters are shifted a given percentage of the variance of that cluster away from the mean of the original cluster. They use the variance of the old cluster as their initial variance.

When iteratively training the means of a set of clusters, an average squared error is calculated which is the average of the distance of each pattern to the cluster nearest it. If the average squared error changes by less than a certain percentage each iteration, the algorithm stops. Likewise, if more than a certain number of iterations have gone by with this set of clusters, the algorithm stops. At this point, the existing clusters are split, pruned, or the program is finished.

The iterative training for each pass through the data is as follows: The patterns for which this is the closest cluster are found. The new center of this cluster is the mean of those patterns. The new variance is the variance of those patterns.

OPTIONS
-- Prints a list of all flags and arguments.

-cluster_by_class
    Train a separate set of clusters for each class.

-ncenters n
    n is the total number of clusters to find or the number of clusters to find for each class.

-ncenters_list n[,n]...
    The number of clusters to find for each of the noutputs classes.
    Example: -ncenters_list 3,6,2,1,5

-split_percentage x
    x is the percent of the variance of a cluster to perturb the means of the two clusters created from it when it is split.

-add_random_offset
    Perturb clusters a small extra amount when splitting. Breaks up symmetries in certain data bases.

-max_iteration n
    Do at most n iterations after a split or after reducing the number of clusters.

-stop_percentage x
    When the average squared error of the points assigned to each cluster changes by less than stop_percentage, do a split, reduce the number of clusters, or stop the algorithm, whichever is appropriate.

-reduce_step n
    When finding a non-binary number of clusters, prune n clusters at a time.

-classifier_options
    kmeans_lnk accepts the general classifier arguments described on the classifier(1) manual page. Certain arguments are not used by the program, and so are not available.

    Unavailable arguments from general list:

    -adjust_test_priors -test_priors_list -test_uniform_priors
        There is no testing mode.
        -log_outputs, -verror -ferror No error file is created.

    -random
        This flag only has an effect when adjust_train_priors is set.

REFERENCE
Richard O. Duda and Peter E. Hart, Pattern Classification and Scene Analysis, John Wiley & Sons, New York, 1973. Pages 225-228.

SEE ALSO
classifier(1), kmeans_plot_bound(1)

HISTORY
First written 26 May 1992 by Linda Kukolich

BUGS
Send bug reports to Linda Kukolich (kukolich@sst.ll.mit.edu)