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

HMRF Class Reference

A class representing a hidden Markov random field. More...

#include <HMRF.hpp>

Inheritance diagram for HMRF:

Seg_Model List of all members.

Public Member Functions

 HMRF ()
 Constructor.
 HMRF (Neighborhood_System *nhs)
 Constructor.
 HMRF (uint k, uint dim, Neighborhood_System *nhs)
 Constructor.
 HMRF (Random_Field *rf, vector< Distribution * > const &distrib)
 Constructor.
 HMRF (Random_Field *rf, vector< Diag_Normal * > const &distrib)
 Constructor.
 HMRF (Random_Field *rf, vector< Normal * > const &distrib)
 Constructor.
 HMRF (Random_Field *rf, vector< Laplace * > const &distrib)
 Constructor.
 HMRF (Random_Field *rf, vector< HighDim_Normal * > const &distrib)
 Constructor.
 ~HMRF ()
 Destructor.
uint Get_N ()
 Get the number of sites.
double LogLikelihood (Spatial_Data *spatd)
 Likelihood.
double BIC (Spatial_Data *spatd)
 BIC -- Bayesian Information Criterion.
double ICL (Spatial_Data *spatd)
 ICL -- Integrated Completed Likelihood.
double H (uint i, uint k, vector< uint > const &z)
 Hamiltonian.
double Hmf (uint i, uint k)
 Mean-field hamiltonian, $ H $.
void Compute_PGmf (vector< double > &P_G)
void Set_Zmf (vector< double > const &z)
 Set the mean-field neighborhood, $ \tilde Z $.
void Set_Zmf (vector< double > const &z, uint i)
 Set the mean-field neighborhood, $ \tilde Z $ at site i.
void Get_Zmf (vector< double > &z)
 Get the mean-field neighborhood, $ \tilde Z $.
void Simulate (Data *dat, uint gibbs_sampler_nbiter)
 Simulation procedure.
void Simulate (Data *dat, double grad_tol)
 Simulation procedure.
void Set_Gradient (double step, double tol, uint maxiter)
 Set gradient descent parameters.
void Estimate_MRF (vector< double > const &tik)
 Estimate the MRF parameters.
void Estimate (Spatial_Data *spatd, vector< double > const &tik)
 Step M of the NR-EM algorithm.
double Completed_LogLikelihood (Spatial_Data *spatd, vector< double > const &tik)
 Completed likelihood.
double PLIC (Spatial_Data *spatd, vector< uint > const &Z_ICM)
 PLIC -- Pseudolikelihood Information Criterion.
uint Degrees_Of_Freedom ()
 Degrees of freedom.
void Info ()
 Information.
void ReadFromFile (string filename)
 Read from file.
void WriteToFile (string filename)
 Write to file.

Protected Attributes

Random_FieldRF
 (hidden) MRF

Detailed Description

Author:
Lemine Abdallahi
Date:
Aug. 2005
Abstract class.


Constructor & Destructor Documentation

HMRF::HMRF  ) 
 

Default constructor

HMRF::HMRF Neighborhood_System nhs  ) 
 

Default constructor

HMRF::HMRF uint  k,
uint  dim,
Neighborhood_System nhs
 

Default constructor

HMRF::HMRF Random_Field rf,
vector< Distribution * > const &  distrib
 

Detailed constructor

HMRF::HMRF Random_Field rf,
vector< Diag_Normal * > const &  distrib
 

Detailed constructor

HMRF::~HMRF  ) 
 

Destructor.


Member Function Documentation

double HMRF::BIC Spatial_Data spatd  )  [virtual]
 

Compute the BIC -- Bayesian Information Criterion.

Parameters:
[in] spatd : Spatial data (observations).
Returns:
the value of the BIC.
This is an mean-field approximation of the BIC.

Reimplemented from Seg_Model.

double HMRF::Completed_LogLikelihood Spatial_Data spatd,
vector< double > const &  tik
 

Compute the Completed log likelihood.

Parameters:
[in] spatd : Spatial data (observations).
[in] tik : fuzzy classifications
Returns:
the value of the completed likelihhood.

void HMRF::Compute_PGmf vector< double > &  P_G  ) 
 

Compute

$ \tilde \Pi(Z_i = k | \tilde z ) = \frac { Exp[ \tilde H_{ik}] } { \sum_h Exp [ \tilde H_{ih}] } , \forall k=1, \dots ,K $

Parameters:
[out] P_G : a vector containing all the probabilities.

uint HMRF::Degrees_Of_Freedom  )  [virtual]
 

Number of free parameters ... useful for model selection.

Reimplemented from Seg_Model.

void HMRF::Estimate Spatial_Data spatd,
vector< double > const &  tik
[virtual]
 

Estimate the model parameters

Parameters:
[in] spatd : Spatial data (observations).
[in] tik : fuzzy classifications
Abstract . Model-dependent.

Reimplemented from Seg_Model.

void HMRF::Estimate_MRF vector< double > const &  tik  ) 
 

Estimate then MRF model given the fuzzy classification.

Parameters:
[in] spatd : Spatial data (observations). Not used here.
[in] tik : fuzzy classifications

uint HMRF::Get_N  ) 
 

Get the number of sites.

Returns:
The number of sites.

void HMRF::Get_Zmf vector< double > &  z  ) 
 

Get the mean-field neighborhood, $ \tilde Z $ .

Parameters:
[out] z : a vector of doubles.

double HMRF::H uint  i,
uint  k,
vector< uint > const &  z
 

Compute the Hamiltonian of the MRF.

Parameters:
i : a site.
k : a class.
z : MRF state.
Returns:
The value of the hamiltonian.

double HMRF::Hmf uint  i,
uint  k
 

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

Parameters:
i : a site.
k : a class.
Returns:
The value of the approximate hamiltonian.

double HMRF::ICL Spatial_Data spatd  )  [virtual]
 

Compute the ICL -- Integrated Completed Likelihood

Parameters:
[in] spatd : Spatial data (observations).
Returns:
the value of the ICL.

Reimplemented from Seg_Model.

double HMRF::LogLikelihood Spatial_Data spatd  )  [virtual]
 

Comptue the Log-Likelihood

Parameters:
[in] spatd : Spatial data (observations).
Returns:
the value of the log-likelihood.

Reimplemented from Seg_Model.

double HMRF::PLIC Spatial_Data spatd,
vector< uint > const &  Z_ICM
 

PLIC -- Pseudolikelihood Information Criterion

Parameters:
[in] spatd : Spatial data (observations).
[in] Z_ICM : restoration labels.
Returns:
the value of the PLIC.

void HMRF::ReadFromFile string  filename  ) 
 

read from a file

file format details :

void HMRF::Set_Gradient double  step,
double  tol,
uint  maxiter
 

Set the gradient descent parameters.

Parameters:
[in] step : gradient descent step.
[in] tol : lower limit for the gradient.
[in] maxiter : maximum number of iterations.
Defines the (optimal) parameters for the gradient descent to converge.

At each iteration, the model parameters are updated with a step step.

The gradient descent is stopped whenever the gradient is under tol or the maximum number of iterations is reached.

void HMRF::Set_Zmf vector< double > const &  z,
uint  i
 

Set the mean-field neighborhood, $ \tilde Z $ at site i

Parameters:
[in] z : a vector of doubles.
[in] i : a site.

void HMRF::Set_Zmf vector< double > const &  z  ) 
 

Set the mean-field neighborhood, $ \tilde Z $

Parameters:
[in] z : a vector of doubles.

void HMRF::Simulate Data dat,
double  grad_tol
 

Simulation procedure.

void HMRF::Simulate Data dat,
uint  gibbs_sampler_nbiter
 

Simulation procedure.

void HMRF::WriteToFile string  filename  ) 
 

save in a file


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