[Master Index] [Index for export/lyngby]



Function Synopsis

lyngby_km_plot_scat(Centers, varargin)

Help text

 lyngby_km_plot_scat  - K-means scattergram of cluster centers

       function lyngby_km_plot_scat(Centers, ...
          'PropertyName', 'PropertyValue')
       Input:    Centers  Matrix with cluster centers

       Property: Assign   Vector with assignment corresponding to the
                          row index of the 'Data' datamatrix
                 Data     Original data, the number of columns should
                          equal that in Centers 
                 Labels   Label (eg. known labels) that should
                          correspond to the rows 'Data' datamatrix.

       This function plots a scattergram of the cluster centers from
       a K-means clustering analysis. The cluster center matrix is
       singular value decomposed and the centers are projected to a
       2D subspace spanned by the principal components. 

       If 'Data' are given (the original data matrix) then these are
       projected to the subspace. If 'Assign' is given then the
       projected elements in 'Data' are colored according to their
       cluster membership. Furthermore if 'Labels' are given the
       elements in 'Data' are rendered with different points. 

         load iris.txt
         [centers, assign] = lyngby_km_main(iris, 'type', 'mean', 
            'standardization', 'std', 'clusters', 3);
         lyngby_km_plot_scat(centers, 'assign', assign, 'data', iris, 
            'labels', kron([1 2 3],ones(1,50)))


 $Id: lyngby_km_plot_scat.m,v 1.2 2003/01/30 11:52:45 fnielsen Exp $

Produced by mat2html on Wed Jul 29 15:43:40 2009
Cross-Directory links are: OFF