Home > brede > brede_mat_nmf.m

brede_mat_nmf

PURPOSE ^

brede_mat_nmf - Non-negative matrix factorization

SYNOPSIS ^

function [O1, O2, O3] = brede_mat_nmf(M, varargin)

DESCRIPTION ^

 brede_mat_nmf        - Non-negative matrix factorization

       [W, H] = brede_mat_nmf(M, varargin)
       [W, L, H] = brede_mat_nmf(M, varargin)

       Input:    M     'Mat' structure

       Property: Components      [ {4} | Positive integer | Auto ]
                                 Number of components 
                 Cost            [ {Euclidean} | Divergence ] Cost
                                 function 
                 Info            Amount of information. A value over
                                 5 gives a plot of cost function
                                 evolution 
                 IterationProbe  [ {250} | Positive integer ]
                                 Iterations before the cost function is
                                 evaluated 
                 MaxIterations   [ {50000} | Positive integer ] Number of
                                 iterations of the algorithm  
                 Runs            [ {1} | positive integer ] Number of
                                 restarts 
                 Seed            [ {[]} | real ] Seed for random
                                 generator 
                 ToleranceZeroWH [ {10^20 * realmin} | real | [] ]
                                 Value specifying numerically zero
                                 element in W and H 

       Output:   W     'Max' structure
                 H     'Mat' structure
                 L     'Mat' structure

       Non-negative matrix factorization

                W * H = nmf(M)

       If there are 3 output arguments the left and right matrices
       will be unitary matrices while the middle matrix will contain
       "eigenvalues":

                W * L * H = nmf(M)

       The rank will of WH will typically be lower than the rank of M
       so that there is a residual: WH = M + U.

       'Components' specifies the number of columns of W and the
       number of rows of H, ie, the rank of the decomposition. 

       'Cost' specifies the cost-function that is optimized. ...
       'Euclidean' is the square error (the Frobenius norm of the
       residual), while 'Divergence' is a Kullback-Leibler type
       (information theoretic cost).

       'MaxIterations' is the maximum number of iterations. The
       algorithm might stop before if one of the other stop criteria
       are met.

       The function uses brede_nmf_est to do the actual
       update/estimation of the NMF model. See this function for more
       information. 

       Example: 
         f = fullfile(fileparts(which('brede')), 'xml', 'wobibs.xml');
         B = brede_read_xml(f, 'output', 'collapsesecond');
         M = brede_bib_bib2mat(B, 'type', 'abstract');
         M = brede_mat_elimsingle(M)
         M = brede_mat_elimstop(M, 'filename', 'stop_english1.txt')
         M = brede_mat_elimstop(M, 'filename', 'stop_medline.txt')
         M = brede_mat_elimstop(M, 'filename', 'stop_lobaranatomy.txt')
         M = brede_mat_elimstop(M, 'filename', 'stop_meshcommon.txt')
         M = brede_mat_elimstop(M, 'filename', 'stop_pubmed_neg1.txt')
         [W, H] = brede_mat_nmf(M, 'Info', 3)
 
       See also BREDE, BREDE_MAT, BREDE_NMF_EST, BREDE_MAT_ICA,
                BREDE_MAT_KMC, BREDE_MAT_SVD.

 $Id: brede_mat_nmf.m,v 1.18 2008/02/28 22:57:24 fn Exp $

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 27-Nov-2009 18:11:22 by m2html © 2005