Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

DHMRF Class Reference

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

#include <DHMRF.hpp>

Inheritance diagram for DHMRF:

Seg_Model Diag_Normal_DMRF HighDim_Normal_DMRF Laplace_DMRF Normal_DMRF List of all members.

Public Methods

virtual ~DHMRF ()
 Destructor.

uint Get_K ()
 Get the number of classess/colors ...

uint Get_N ()
 Get the number of sites.

uint Get_L ()
 Get the number of possibilities.

bool Check ()
 Check sizes.

uint upper_class (uint k)
 Get the upper class.

virtual double Density (vector< double > const &X, uint k)
 Compute the density for subclass k.

virtual double Density (uint i, vector< double > const &xi, uint l)
 Compute the density for class p, mean-field approximation.

virtual double Density (uint i, vector< double > const &xi, vector< uint > const &z, uint l)
 Compute the density for class p.

double Likelihood (Spatial_Data *spatd)
 Likelihood.

double BIC (Spatial_Data *spatd)
 BIC -- Bayesian Information Criterion.

double ICL (Spatial_Data *spatd)
 ICL -- Integrated Completed Likelihood.

void Compute_PY_ICM (vector< uint > const &y, vector< uint > const &z, uint i, Spatial_Data *spatd, vector< double > &PG)
 compute conditional probs given neighborhood labels and observations .

void Compute_PZ_ICM (vector< uint > const &y, vector< uint > const &z, uint i, Spatial_Data *spatd, vector< double > &PG)
 compute conditional probs given neighborhood labels and observations .

void Compute_P_Y_X (uint i, Spatial_Data *spatd, vector< double > &PG_Y)
 compute mean-field conditional probs given neighborhood and observations

void Compute_P_Z_X (uint i, Spatial_Data *spatd, vector< double > const &PG_Y, vector< double > &PG_Z)
 compute mean-field conditional probs given neighborhood and observations

void Compute_PGmf (vector< double > &P_G)
 compute , given MF neighborhood

void Compute_tik (Spatial_Data *spatd, vector< double > &til)
 compute fuzzy clasification

void Set_Zmf (vector< double > const &z)
 Set the mean-field neighborhood, .

void Set_Ymf (vector< double > const &y)
 Set the mean-field neighborhood, .

void Set_Zmf (vector< double > const &z, uint i)
 Set the mean-field neighborhood, at site i.

void Set_Ymf (vector< double > const &y, uint i)
 Set the mean-field neighborhood, at site i.

void Get_Zmf (vector< double > &z)
 Get the mean-field neighborhood, .

void Get_Ymf (vector< double > &z)
 Get the mean-field neighborhood, .

void SetGradient (double step, double tol, uint maxiter)
 Set gradient descent parameters.

void Estimate_MRF (Spatial_Data *spatd, vector< double > const &til)
 Estimate the MRF parameters.

virtual void NREM_E (Spatial_Data *spatd, vector< double > &til)
 Step E of the NR-EM algorithm.

virtual void NREM_M (Spatial_Data *spatd, vector< double > const &til)
 Step M of the NR-EM algorithm.

void ICM (Spatial_Data *spatd, vector< uint > &Y_ICM, vector< uint > &Z_ICM)
 ICM restoration.

double Completed_Likelihood (Spatial_Data *spatd, vector< double > const &til)
 Completed likelihood.

double PLIC (Spatial_Data *spatd, vector< uint > const &Z_ICM)
 PLIC -- Pseudolikelihood Information Criterion.


Protected Attributes

MRFY
 (hidden) MRF

Conditional_MRFZ
 (hidden) Conditional MRF


Detailed Description

Author:
Juliette Blanchet
Date:
Nov. 2005
Abstract class.


Constructor & Destructor Documentation

DHMRF::~DHMRF   [virtual]
 

Destructor.


Member Function Documentation

double DHMRF::BIC Spatial_Data   spatd [virtual]
 

Compute the BIC -- Bayesian Information Criterion.

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

Reimplemented from Seg_Model.

bool DHMRF::Check  
 

Check sizes

Returns:
false if there is no error.

double DHMRF::Completed_Likelihood Spatial_Data   spatd,
vector< double > const &    til
 

Compute the Completed likelihood.

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

void DHMRF::Compute_PGmf vector< double > &    PG
 

Compute

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

void DHMRF::Compute_PY_ICM vector< uint > const &    y,
vector< uint > const &    z,
uint    i,
Spatial_Data   spatd,
vector< double > &    PG
 

Compute

( For ICM algorithm )

void DHMRF::Compute_PZ_ICM vector< uint > const &    y,
vector< uint > const &    z,
uint    i,
Spatial_Data   spatd,
vector< double > &    PG
 

Compute

( For ICM algorithm )

void DHMRF::Compute_tik Spatial_Data   spatd,
vector< double > &    til
 

Compute the fuzzy classifications .

am[in] spatd : Spatial data (observations).
am[out] tik : fuzzy classifications

double DHMRF::Density vector< double > const &    X,
uint    k
[virtual]
 

Compute the density of class k at point X.

Parameters:
X  : observation.
k  : class.
Returns:
the value of the density.
Abstract . Model-dependent.

Reimplemented in Diag_Normal_DMRF, HighDim_Normal_DMRF, Laplace_DMRF, and Normal_DMRF.

void DHMRF::Estimate_MRF Spatial_Data   spatd,
vector< double > const &    tip
 

Estimate then MRF model given the fuzzy classification.

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

uint DHMRF::Get_K  
 

Get the number of classes/colors.

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

uint DHMRF::Get_L  
 

Get the number of possibilities.

Returns:
The number of possibilities in the double MRF.

uint DHMRF::Get_N  
 

Get the number of sites.

Returns:
The number of sites.

void DHMRF::Get_Ymf vector< double > &    y
 

Get the mean-field neighborhood, .

am[out] y : a vector of doubles.

void DHMRF::Get_Zmf vector< double > &    z
 

Get the mean-field neighborhood, .

am[out] z : a vector of doubles.

double DHMRF::ICL Spatial_Data   spatd [virtual]
 

Compute the ICL -- Integrated Completed Likelihood

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

Reimplemented from Seg_Model.

void DHMRF::ICM Spatial_Data   spatd,
vector< uint > &    Y_ICM,
vector< uint > &    Z_ICM
 

ICM Algorithm restoration.

am[in] spatd : Spatial data (observations).
am[out] Z_ICM : restoration labels.
Initial step of the ICM restoration Algorithm.

double DHMRF::Likelihood Spatial_Data   spatd [virtual]
 

Comptue the Log-Likelihood

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

Reimplemented from Seg_Model.

void DHMRF::NREM_E Spatial_Data   spatd,
vector< double > &    tip
[virtual]
 

Perofrm the E step of the NREM Algorithm

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

Reimplemented in Diag_Normal_DMRF, HighDim_Normal_DMRF, Laplace_DMRF, and Normal_DMRF.

void DHMRF::NREM_M Spatial_Data   spatd,
vector< double > const &    tip
[virtual]
 

Perofrm the M step of the NREM Algorithm

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

Reimplemented in Diag_Normal_DMRF, HighDim_Normal_DMRF, Laplace_DMRF, and Normal_DMRF.

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

PLIC -- Pseudolikelihood Information Criterion

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

void DHMRF::Set_Ymf vector< double > const &    y,
uint    i
 

Set the mean-field neighborhood, at site i

am[in] y : a vector of doubles.
am[in] i : a site.

void DHMRF::Set_Ymf vector< double > const &    y
 

Set the mean-field neighborhood,

am[in] y : a vector of doubles.

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

Set the mean-field neighborhood, at site i

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

void DHMRF::Set_Zmf vector< double > const &    z
 

Set the mean-field neighborhood,

am[in] z : a vector of doubles.

void DHMRF::SetGradient double    step,
double    tol,
uint    maxiter
 

Set the gradient descent parameters.

am[in] step : gradient descent step.
am[in] tol : lower limit for the gradient.
am[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.


The documentation for this class was generated from the following files:
Generated on Tue Nov 8 14:55:49 2005 for NEM by doxygen1.2.18