Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | File Members

MRF Class Reference

A class representing an MRF. More...

#include <MRF.hpp>

Inheritance diagram for MRF:

Random_Field External_Potts Generic_Potts Potts List of all members.

Public Member Functions

virtual ~MRF ()
 Destructor.
uint Get_K ()
 Get the number of classess/colors ...
virtual double H (uint i, uint k, vector< uint > const &Z)
 Hamiltonian.
virtual double Hmf (uint i, uint k)
 Mean-field hamiltonian, $ \tilde H $.
double PL (vector< uint > const &Z)
 compute the pseudo-likelihood for data $ Z $
virtual void Gradient (vector< double > const &tik, vector< double > &Q)
 Compute the gradient.
virtual void Update_Gradient (vector< double > const &Q)
 Update model parameters in the gradient descent.
virtual void Read_Params (istream &is)
 Read the model parameters from the stream is.
virtual void Write_Params (ostream &os)
 Write the model parameters to the stream os.
virtual uint Degrees_Of_Freedom ()
 Number of free parameters.
virtual void Info ()
 Print some info on the model.

Protected Member Functions

void Precompute_Smf ()
 Precompute mean-field sums of Z (for the gradient algo.).

Protected Attributes

uint K
 Number of classes.

Detailed Description

Author:
Lemine Abdallahi
Date:
Aug. 2005
Generic Markov Random Field model. Abstract.


Constructor & Destructor Documentation

MRF::~MRF  )  [virtual]
 

Destructor.


Member Function Documentation

uint MRF::Degrees_Of_Freedom  )  [virtual]
 

Number of free parameters.

Returns:
the degrees of freedom of the MRF model.
Abstract. Model-dependent.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

uint MRF::Get_K  )  [virtual]
 

Get the number of classes/colors.

Returns:
The number of classes/colors in the MRF.

Reimplemented from Random_Field.

void MRF::Gradient vector< double > const &  tik,
vector< double > &  Q
[virtual]
 

Computes the gradient given $ t_ik $ .

Parameters:
[in] tik : fuzzy classification.
[out] Q : Gradient vector.
Abstract. Model-dependent.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

double MRF::H uint  i,
uint  k,
vector< uint > const &  Z
[virtual]
 

Compute the Hamiltonian

Parameters:
i : a site.
k : a class.
z : current state.
Returns:
The value of the hamiltonian.
Abstract. Model-dependent.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

double MRF::Hmf uint  i,
uint  k
[virtual]
 

Compute the Hamiltonian mean-field approximation, given $ \tilde Z $

Parameters:
i : a site.
k : a class.
Returns:
The value of the approximate hamiltonian.
Abstract. Model-dependent.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

void MRF::Info  )  [virtual]
 

Print some info on the model.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

double MRF::PL vector< uint > const &  Z  ) 
 

Compute the pseudo-Likelihhod of a given realization Z.

$ PL(Z)=\sum_i log P[Z_i=z_i | Z_{N_i}] $

Parameters:
[in] Z : current state.

void MRF::Read_Params istream &  is  )  [virtual]
 

Read the model parameters from the stream is.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

void MRF::Update_Gradient vector< double > const &  Q  )  [virtual]
 

Updates the model parameters in the gradient descent.

Parameters:
[in] Q : current gradient value.
Abstract. Model-dependent.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.

void MRF::Write_Params ostream &  os  )  [virtual]
 

Write the model parameters to the stream os.

Reimplemented from Random_Field.

Reimplemented in External_Potts, Generic_Potts, and Potts.


The documentation for this class was generated from the following files:
Generated on Thu Jan 12 11:55:03 2006 for NEM by  doxygen 1.4.4