CRF Model
The Binary LN Model described in the bachelor thesis "Maximum Likelihood Learning And Inference In Conditional Random Fields" by Iulian Vlad Serban, University of Copenhagen, 2012.
CRF::CRFModel_CD Class Reference
Inheritance diagram for CRF::CRFModel_CD:
CRF::CRFModel_GraphCut CRF::CRFModel

List of all members.

Public Member Functions

 CRFModel_CD ()
 CRFModel_CD (int imgWidth, int imgHeight, int MAPSTEPS)
void SetCDParameters (int ChainSteps, int ChainCount)
void EstimateModelParameters (const std::vector< double_double_vector > &InputSamples, const std::vector< int_int_vector > &OutputSamples, size_t Steps, double StepFactor)
double_vector ApproximateExpectedFeatureFunctions (const double_double_vector &Input, const int_int_vector &Output, size_t SampleIndex)

Public Attributes

size_t chainSteps
size_t chainCount
size_t testNumber

Constructor & Destructor Documentation

Constructor that initializes the configuration of the model. Width and Height are set to 1 pixel.

CRFModel_CD::CRFModel_CD ( int  imgWidth,
int  imgHeight,
int  MAPSTEPS 
)

Constructor that initializes the configuration of the model.

Parameters:
imgWidthImage width in pixels.
imgHeightImage height in pixels.
MAPSTEPSMaximum number of steps to perform MAP estimation.

Member Function Documentation

double_vector CRFModel_CD::ApproximateExpectedFeatureFunctions ( const double_double_vector &  Input,
const int_int_vector &  Output,
size_t  SampleIndex 
)

Approximates the expected feature functions using Gibbs Chains.

Parameters:
InputInput sample.
OutputCorrect output sample used to initialize the Gibbs chain.
SampleIndexThe current training sample index.
Returns:
A pseudo partition function (which is not to be used for further calculations) and the feature functions (under the models pdf). The forrmat is: Ret[0] = Partition Function, Ret[1] = expected feature function 0, ..., Ret[paramCount + 1] = value of expected feature function paramCount.
void CRFModel_CD::EstimateModelParameters ( const std::vector< double_double_vector > &  InputSamples,
const std::vector< int_int_vector > &  OutputSamples,
size_t  Steps,
double  StepFactor 
) [virtual]

Estimates the model parameters using contrastive divergence.

Parameters:
InputSamplesArray of input samples. The format is InputSamples[i] = Input Sample i.
OutputSamplesArray of correctly classified output samples. The format is OutputSamples[i] = Output Sample i.
StepsNumber of steps to perform steepest decent before terminating.
StepFactorFactor determining the step length (in the direction of the loglikelihood gradient) of each iteration. Should be greater than zero and likely less than one. (The actual step length taken is multiplied by the preprocessor variable FeatureFunctionScaleDivision, which was divided by in the function EvaluateNodeVector to improve numerical accuracy on the partition function. This is just a computational practicality and will not affect any other calculations.).

Reimplemented from CRF::CRFModel.

void CRFModel_CD::SetCDParameters ( int  ChainSteps,
int  ChainCount 
)

Sets the parameters of the contrastive divergence learning / inference methods.

Parameters:
ChainStepsNumber of iterations each chain takes.
ChainCountNumber of chains to average over.

Member Data Documentation

Number of chains to average over.

Number of iterations each chain takes.

The current test number. Used for experiments.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables