[Master Index] [Index for export/lyngby]

lyngby_km_loglikelihood

(export/lyngby/lyngby_km_loglikelihood.m)


Function Synopsis

l = lyngby_km_loglikelihood(X, Centers, Assign, varargin)

Help text

 lyngby_km_loglikelihood - Log likelihood of K-means model

       l = lyngby_km_loglikelihood(X, Center, Assign)

       Input:    X         Data matrix
                 Center    Centers of estimated clusters
                 Assign    Assignment vector

       Property: SigmaType [ ML | {Unbiased} | Unbiased2 ] Estimation
                           type for the variance

       Output:   l         Log likelihood

       Calculate the logarithm of the likelihood to the K-means model
       when it is regarded as a Gaussian mixture model with isotropic
       variance and an equal assignment weight. 
     
       The within variance assumes an isotropic variance, ie, that
       there has been no standardization (eg, 'std' or 'range')
       during the K-means estimation.  

       Acknowledgment: Berkan Dulek, Kristoffer H. Madsen.

       Example:
         load iris.txt
         for n = 1:50
           [C,A] = lyngby_km_main(iris, 'type', 'mean', 'clusters', n, 'init', 'random');
           l(n) = lyngby_km_loglikelihood(iris, C, A, 'sigmatype', 'unbiased2');
         end
         plot(l), xlabel('Clusters'), ylabel('Log likelihood')

       See also LYNGBY, LYNGBY_KM_MAIN, LYNGBY_KM_WITHIN,
                LYNGBY_KM_BIC, LYNGBY_IKM_MAIN, LYNGBY_IKM_BIC.

 $Id: lyngby_km_loglikelihood.m,v 1.4 2005/09/27 21:56:13 fnielsen Exp $

Cross-Reference Information

This function calls
This function is called by

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