Home > MRFLearning > PL.m



Estimate the PL parameters for a boltzmann m/c


function model = PL(data,A)


 Estimate the PL parameters for a boltzmann m/c
          data: (N X V) matrix containing the data samples. 
                 N is the total number of samples and V is the total number of nodes                                         
                 Each node can take values from {+1,-1} or {0,1}.
             A: (V X V) adjacency matrix defining the graph structure
          model: (1X1) struct array with fields
                   N: the number of nodes
                   A: adjacency matrix                 
                   b: the biases  ( PL estimates )
                   w: the edge weights ( PL estimates )
           Optionally saves a file "paramVec.mat" showing the sequence of
           updates to the parameters  

 The node value representation ( +1/-1 or 0/1) intended by the user is detected from the training samples.       
 If using 0/1, the data is first mapped to +1/-1 and the model params are learned. 
 These learned params are then mapped back to the 0/1 case.

 If the variable MONITOR is set to 1 on line <62>, a file "paramVec.mat" is generated that saves the parameter
 updates. One can plot these values to see if the gradient learning
 parmeters (MAX_ITERATIONS,ADAPT_PTS,EPSILON1,RHO_CHANGE,rho,rho_w,rho_b,momentum,batchsize) are reasonable. If not they can
 be changed on lines <53-61>

 Running of gradient ascent: one can chose the iterations (ADAPT_PTS) where the the global learning rate (rho) can be changed as given by (RHO_CHANGE). 
 Stops when either MAX_ITERATIONS is reached or maximum change across all
 parameters is less than EPSILON1. If required to have differnet learning
 rates for the biases and weights, we can set rho_b and rho_w different
 from 1. Uses learning by minibatches with momentum



This function calls: This function is called by:
Generated on Wed 28-Sep-2005 04:10:02 by m2html © 2003