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

Possibility_MRF Class Reference

A class representing an Possibility_MRF. More...

#include <Possibility_MRF.hpp>

Inheritance diagram for Possibility_MRF:

Possibility_Generic_Potts Possibility_Potts List of all members.

Public Methods

virtual ~Possibility_MRF ()
 Destructor.

void Get_subK (vector< uint > &subk)
 Get the subclass vector.

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

uint Get_P ()
 Get the total number of possibilities.

uint Get_N ()
 Get the number of sites.

void Set_Y (vector< uint > const &y)
 Set Y.

void Simulate (vector< uint > &Z)
 Simulate the Possibility_MRF, one iteration. Gibbs sampler.

void Simulate (uint nbiter, vector< uint > &Z)
 Simulate the Possibility_MRF, Gibbs sampler.

virtual double H (uint i, uint k, vector< uint > const &Z)
 Hamiltonian.

virtual double Hmf (uint i, uint k)
 Mean-field hamiltonian, .

void Compute_cond_probs (uint i, vector< uint > const &Z, vector< double > &probs)
 Compute class conditional probabilities at site i given the neighbors.

void Compute_PGmf (vector< double > &P_G)
 Compute conditional probabilities at site i given the neighbors. mean-field appoximation.

double PL (vector< uint > const &Z)
 compute the pseudo-likelihood for data

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

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

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

void Set_Z (vector< uint > const &z)
 Set neighborhood .

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 Attributes

Neighborhood_SystemNHS
 Underlying neighborhood system.

vector< uint > subK
 vector of subclasses.

vector< double > Z_mf
 Mean field neighborhood .

vector< uint > Y
 father class


Detailed Description

Author:
Juliette Blanchet
Date:
Oct. 2005
Generic Possibility Markov Random Field model. Abstract.


Constructor & Destructor Documentation

Possibility_MRF::~Possibility_MRF   [virtual]
 

Destructor.


Member Function Documentation

void Possibility_MRF::Compute_cond_probs uint    i,
vector< uint > const &    Z,
vector< double > &    probs
 

Compute the conditional probabilities:

am[in] Z : current state.
Parameters:
i  : a site.
k  : a class.
For gibbs sampler, Pseudo-Likelihood, ...

void Possibility_MRF::Compute_PGmf vector< double > &    P_G
 

Compute

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

uint Possibility_MRF::Degrees_Of_Freedom   [virtual]
 

Estimate the parameters given the state

am[in] Z : current Possibility_MRF state.

Reimplemented in Possibility_Generic_Potts, and Possibility_Potts.

uint Possibility_MRF::Get_K  
 

Get the total number of classes

Returns:
the total number of classes in the Possibility_MRF.

uint Possibility_MRF::Get_N  
 

Get the number of sites.

Returns:
The number of sites.

uint Possibility_MRF::Get_P  
 

Get the total number of possibilities

Returns:
the total number of possibilities in the Possibility_MRF.

void Possibility_MRF::Get_subK vector< uint > &    subk
 

Get the vector of subclasses/subcolors.

Returns:
The vector of subclasses/subcolors in the Possibility_MRF.

double Possibility_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 in Possibility_Generic_Potts, and Possibility_Potts.

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

Compute the Hamiltonian mean-field approximation, given

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

Reimplemented in Possibility_Generic_Potts, and Possibility_Potts.

void Possibility_MRF::Info   [virtual]
 

Print some info on the model.

Reimplemented in Possibility_Generic_Potts, and Possibility_Potts.

double Possibility_MRF::PL vector< uint > const &    Z
 

Compute the pseudo-Likelihhod of a given realization Z.

am[in] Z : current state.

void Possibility_MRF::Read_Params istream &    is [virtual]
 

Read the model parameters from the stream is.

Reimplemented in Possibility_Generic_Potts, and Possibility_Potts.

void Possibility_MRF::Set_Z vector< uint > const &    z
 

Set the mean-field neighborhood, given Possibility_MRF current state .

am[in] z : current Possibility_MRF state.
Define|Set neighborhod conditions.

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

Set the mean-field neighborhood, , at site i

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

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

Set the mean-field neighborhood,

am[in] z : vector of doubles.

void Possibility_MRF::Simulate uint    nbiter,
vector< uint > &    Z
 

Simulation algorithm. Gibbs Sampler. N iterations over all the sites.

am[in] nbiter : number of iterations.
am[in] Z : current state.
am[out] Z : new state

void Possibility_MRF::Simulate vector< uint > &    Z
 

Simulation algorithm. Gibbs Sampler. 1 iteration over all the sites.

am[in] Z : current state.
am[out] Z : new state

void Possibility_MRF::Write_Params ostream &    os [virtual]
 

Write the model parameters to the stream os.

Reimplemented in Possibility_Generic_Potts, and Possibility_Potts.


The documentation for this class was generated from the following files:
Generated on Thu Oct 27 17:58:54 2005 for NEM by doxygen1.2.18