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

Inliers Class Reference

object for managing an evolving collection of clustered data samples
FOR ANY EXTENSION, THIS OBJECT REQUIRES TO BE RE-IMPLEMENTED. More...

#include <Inliers.hh>

List of all members.

Public Methods

 Inliers (Image< PIXEL > *data, Outliers *O, int nb)
 constructor initialise the Gaussian mixture. More...

void Adaptation ()
 EM algorthm for ML estimate of the mixture model. More...

void Selection ()
 1 iteration of the maximum decrease optimisation. More...

void Outliers_detection ()
 unuseful method to detect outliers to be removed (not working anymore).

void AddRandomRefVectors ()
 Method to add Gaussian components during initialisation.

void Print_Mean_Covariance (int k)
 Method to print on the standard output, the estimated Gaussian model parameters.

void Print_Mean_Covariance_PostRemoval (int k)
 Method to print on the standard output, the estimated Gaussian model parameters, after the simulated removal of each Gaussian Component (survey method not used anymore).

void NearestRefVector_StdDevVar ()
 Method to assign to the point samples the most probable Gaussian Component (Should be private!!).


Public Attributes

unsigned long int nb_inliers
 number of samples.

int nb_RefVector
 number of components in the mixture.

int Change
 variable=1 if convergence of the EM algorithme achieved, 0 otherwise.

int nbMeanIt
 Mean number of iteration before convergence (survey variable, could be removed!).

int nbMeanAdapt
 Mean number of adaptation steps periteration (survey variable, could be removed!).

float *** center_RefVector_PostRemoval
 the Gaussian mean vectors after the simulated removal of each Gaussian component (should be part of RefVector.hh!!!).

unsigned long int * Index_Inliers
 Index of the samples NOT USEFUL because there are no more outliers!!

Image< PIXEL > * im_point
 Pointer to the multiband image data.

int * firstNearestA
 First Gaussian component index assigned to the samples.

int * secondNearestA
 Second Gaussian component index assigned to the samples.

Ref_VectorA
 mean of the Gaussian components.

float *** covariance_cluster
 covariance for each Gaussian(Gaussian components are correlated).


Private Methods

void Initialise (Image< PIXEL > *data_point, Outliers *O, int nb)
 Initialization of the Gaussian components. More...

void Initialise_IndexInliers ()
 Initialization of the index of the samples. NOT USEFUL because there are no more outliers.

void Allocate_Variable_StdDev ()
 Memory allocation to store the mixture model parameters.

void MinMax ()
 Calculation of the bounds of the definition domain of the variables.

void Assigne_data_Euclidian ()
 Grouping of the data samples in clusters according to an Euclidian distance (similar to the first step of a K-Means).

float Proba_Assigne_Euclidian (unsigned long int i, int k)
 Calculation of the Euclidian distance between the i th data sample and the mean of the k th component of the mixture.

void Remove_RefVector (int k, int AllCov)
 Removal of the k th component of the mixture. More...

void Remove_Unaffected_RefVector (int AllCov)
 Removal of all the component of the mixture which do not contain any data points. More...

void Reassigne_inliers_StdDevVariable ()
 Assignement of the data points to the most probable component.

float Proba_Assigne_Gauss (unsigned long int i, int k)
 Calculation of the probability of the i th data point when belonging to the k th Gaussian component of the mixture. More...

float Proba_Assigne_Gauss_PostRemoval (unsigned long int i, int k, int l)
 Calculation of the probability of the i th data point when belonging to the k th Gaussian component of the mixture. More...

void Update_effectif ()
 Calculates the weights (population of the class in the special case where Gaussian do not interfer) of the different Gaussian components.

void Update_Centers ()
 Reevaluate the centers of the Gaussians.

void Estimation_Stdev_RefVector ()
 Estimation of the covariance matrices of the Gaussian components together with their inverse matrices and the inverse matrix determinants. Singularities are also detected and "flagged" by this method.

void Estimation_CovarianceMatrix ()
 Estimation of the covariance matrices of the Gaussian components.

void Singularity_Detection ()
 Detection of the zero values inthe covariance matrices and flag assignements.

void Invert_CovarianceMatrix ()
 Inversion of the covariance matrices and calculation of the inverted matrice determinants. More...

void Estimation_Stdev_RefVector_PostRemoval ()
 Estimation of the mean vectors, the covariance matrices of the Gaussian components together with their inverse matrices and the inverse matrix determinants, after the simulated removal of each Gaussian component. Singularities, after the simulated removal of each Gaussian component, are also detected and "flagged" by this method.

void Estimation_Center_RefVector_PostRemoval ()
 Estimation of the mean vectors of the Gaussian components after the simulated removal of each Gaussian component.

void Estimation_CrossEffectif ()
 Calculates the weights (population of the class in the special case where Gaussian do not interfer) of the different Gaussian components after the simulated removal of each Gaussian component.

void Estimation_CovarianceMatrix_PostRemoval ()
 Estimation of the covariance matrices of the Gaussian components after the simulated removal of each Gaussian component.

void Singularity_Detection_Postremoval ()
 Detection of the zero values inthe covariance matrices and flag assignements after the simulated removal of each Gaussian component.

void Invert_PostCovarianceMatrix ()
 Inversion of the covariance matrices and calculation of the inverted matrice determinants after the simulated removal of each Gaussian component. More...

void NearestRefVector_StdDevVar_PostRemoval ()
 Method to assign to the point samples the most probable Gaussian Component after the simulated removal of each Gaussian component.

void Inliers_Variation_Index_term_cost2 (float *aux)
 Calculation of the length variation for encoding the data points assignement to the Gaussians. More...

void Inliers_Variation_Error_term_cost4 (float *SumErrorRatio)
 Calculation of the length variation for encoding the data points assignement to the Gaussians after the simulated removal of each Gaussian component. More...

float Error_FreeInliers_Singularity (unsigned long int i)
 Method calculating the likelihood code length variation for the special case where th data points belong to a component with singular bands. More...

float Error_FreeInliers (unsigned long int i)
 Method calculating the likelihood code length variation for the i th inliers which was belonging to the simulated removed Gaussian.

void Error_OtherInliers (float *SumErrorRatio)
 Method calculating the likelihood code length variation for the inliers which are not belonging to simulated removed Gaussians. More...

void Update_RefVectors ()
 removes the Gaussian component inducing the maximum decrease of the 2 part MDL code. More...


Private Attributes

OutliersO_point
 pointer to Outliers (Not used anymore!!).

float * maxi_dim
 maximum values of the data on each band.

float * mini_dim
 minimum values of the data on each band.

float *** Inv_covariance_cluster
 Inverted covariance matrices of the clusters.

float **** covariance_cluster_PostRemoval
 Covariance matrices of the clusters after the simulated removal of each Gaussian component.

float **** Inv_covariance_cluster_PostRemoval
 Inverted Covariance matrices of the clusters after the simulated removal of each Gaussian component.

float * determinant
 determinants of the inverted covariance matrices.

float ** determinant_PostRemoval
 determinants of the inverted covariance matrices, after the simulated removal of each Gaussian component.

int * singularity
 Singularity flag equal "1 if a band of teh Gaussian is considered singular or "0" if not.

int ** Singularity_PostRemoval
 After the simulated removal of each Gaussian component, singularity flag equal "1 if a band of teh Gaussian is considered singular or "0" if not.

unsigned long int * effectif_cluster
 population of the Gaussian components.

unsigned long int ** cross_effectif_cluster
 population of each of the Gaussian components, after the simulated removal of each one of them.

float ChangingCriterion
 Criterion evaluating the convergence of the EM algorithm.

float M_LOG2
 Constant.

int nb_init
 Minimum number of Gaussian requiered initially in the mixture.


Detailed Description

object for managing an evolving collection of clustered data samples
FOR ANY EXTENSION, THIS OBJECT REQUIRES TO BE RE-IMPLEMENTED.

This object possesses the adaptation method, the selection method, and also a bunch of other private methods which are used by these 2 main methods or by the constructor. Other public methods are used directly fro initialisation or other purposes.

Definition at line 18 of file Inliers.hh.


Constructor & Destructor Documentation

Inliers::Inliers Image< PIXEL > *    data,
Outliers   O,
int    nb
 

constructor initialise the Gaussian mixture.

After a memory allocation step, components of the mixture are randomly spread in the feature space according to the mean, and variance of the data. The data points are grouped in clusters according to their Euclidian distance to the Gaussian component means (this is the first step of a K-Means). Then, an adaptation step is performed. This procedure is iterated until there are enough Gaussian components in the mixture.

Parameters:
data  pointer to the multiband image data
O  pointer to the outliers (TO BE REMOVED)
nb  minimum number of requiered Gaussian in the mixture

Definition at line 26 of file Inliers.cpp.


Member Function Documentation

void Inliers::Adaptation  
 

EM algorthm for ML estimate of the mixture model.

For the assumption of non-interfering Gaussian in the mixture, the EM algorithm is reduced to the iteration of following to steps until convergence

  • a step for calculating the total assignment of the points to the Gaussians according to a criterion of maximum probability.
  • Reevaluating the Gaussian mean and covariance parameters according to the new points memberships.

Definition at line 76 of file Inliers.cpp.

float Inliers::Error_FreeInliers_Singularity unsigned long int    i [private]
 

Method calculating the likelihood code length variation for the special case where th data points belong to a component with singular bands.

The likelihood varaiations for the bands without a singularity (before and after the simulated removal of Gaussians) are calculated separately, using the full covariance matrices. For the bands with a singularity (except case "singularity->singularity" : zero cost exclusion), we calculate separately the likelihood variations. We then assume independance between these bands and the bands without singularities, so that a simple product (sum for the log-likelihood) gives us the complete likelihood varaiation.

Parameters:
i  index of the image data sample (pixel index)
Returns:
likelihood variation for the i th data point

Definition at line 961 of file Inliers.cpp.

void Inliers::Error_OtherInliers float *    SumErrorRatio [private]
 

Method calculating the likelihood code length variation for the inliers which are not belonging to simulated removed Gaussians.

Parameters:
SumErrorRatio  array of the Variation length of the likelihood of the points not belonging to the simulated removed Gaussians, induced by the simulated removal of each Gaussian component.

Definition at line 998 of file Inliers.cpp.

void Inliers::Initialise Image< PIXEL > *    data_point,
Outliers   O,
int    nb
[private]
 

Initialization of the Gaussian components.

The components of the mixture are randomly spread in the feature space according to the mean, and variance of the data. A few input paramters are fixed as well. The bounds of the definition domain of the variables are finally calculated.

Definition at line 61 of file Inliers.cpp.

void Inliers::Inliers_Variation_Error_term_cost4 float *    SumErrorRatio [private]
 

Calculation of the length variation for encoding the data points assignement to the Gaussians after the simulated removal of each Gaussian component.

This code length calculus is based on the Shannon-Fano coding source theorem (See theoritical note).

Parameters:
SumErrorRatio  array of the Variation length of the likelihood, induced by the simulated removal of each Gaussian component

Definition at line 1044 of file Inliers.cpp.

void Inliers::Inliers_Variation_Index_term_cost2 float *    aux [private]
 

Calculation of the length variation for encoding the data points assignement to the Gaussians.

This code length calculus is based on the Shannon-Fano coding source theorem (See theoritical note).

Parameters:
aux  array of the Variation length in the assignement encoding, induced by the simulated removal of each Gaussian component

Definition at line 904 of file Inliers.cpp.

void Inliers::Invert_CovarianceMatrix   [private]
 

Inversion of the covariance matrices and calculation of the inverted matrice determinants.

The inversion is based on a LU decomposition performed using a function of the Numerical recepies free library

Definition at line 638 of file Inliers.cpp.

void Inliers::Invert_PostCovarianceMatrix   [private]
 

Inversion of the covariance matrices and calculation of the inverted matrice determinants after the simulated removal of each Gaussian component.

The inversion is based on a LU decomposition performed using a function of the Numerical recepies free library

Definition at line 831 of file Inliers.cpp.

float Inliers::Proba_Assigne_Gauss unsigned long int    i,
int    k
[private]
 

Calculation of the probability of the i th data point when belonging to the k th Gaussian component of the mixture.

When a band of the multivariate Gaussian is considered singular (singular components possess a Dirac distribution), we assume, for simplification reasons, independance between the bands and decompose the probability into a product.

Parameters:
i  index of the image data sample (pixel index)
k  index of the most likely Gaussian component assignement
Returns:
probability of the point according to the most likely Gaussian component

Definition at line 314 of file Inliers.cpp.

float Inliers::Proba_Assigne_Gauss_PostRemoval unsigned long int    i,
int    k,
int    l
[private]
 

Calculation of the probability of the i th data point when belonging to the k th Gaussian component of the mixture.

When a band of the multivariate Gaussian is considered singular (singular components possess a Dirac distribution), we assume, for simplification reasons, independance between the bands and decompose the probability into a product.

Parameters:
i  index of the image data sample (pixel index)
k  index of the most likely Gaussian component assignement after the simulated removal of the l th component
l  index of the removed Gaussian component
Returns:
probability of the point according to the most likely Gaussian component after the simulated removal of the l th component

Definition at line 266 of file Inliers.cpp.

void Inliers::Remove_RefVector int    k,
int    AllCov
[private]
 

Removal of the k th component of the mixture.

Parameters:
k  index of the component of the mixture to remove
AllCov  parameter equal "1" if all the Gaussian attributes (mean vector, covariance and inverted covariance matrices, determinants, singularity flag, Gaussian component assignement index after removal) or equal "0" if only themean should be removed (when, at the beginning, assignements were only performed using an Euclidian distance).

Definition at line 489 of file Inliers.cpp.

void Inliers::Remove_Unaffected_RefVector int    AllCov [private]
 

Removal of all the component of the mixture which do not contain any data points.

Parameters:
AllCov  parameter equal "1" if all the Gaussian attributes (mean vector, covariance and inverted covariance matrices, determinants, singularity flag, Gaussian component assignement index after removal) or equal "0" if only themean should be removed (when, at the beginning, assignements were only performed using an Euclidian distance)

Definition at line 477 of file Inliers.cpp.

void Inliers::Selection  
 

1 iteration of the maximum decrease optimisation.

This method calls a private method named "Update_RefVectors()" which removes the Gaussian component inducing the maximum decrease of the 2 part MDL code.

Definition at line 95 of file Inliers.cpp.

void Inliers::Update_RefVectors   [private]
 

removes the Gaussian component inducing the maximum decrease of the 2 part MDL code.

The 2 part code length variation is composed of

  • the variation of code lenght induced by saving the encoding of a Gaussian component (see theoritical note approximation). However, THIS IS A VERY ROUGH APPROXIMATION AND SHOULD BE REPLACED EASILY BY THE TERM DEFINED IN THE THEORITICAL NOTE.
  • neglected variation terms (see theoritical note approximation)
  • the variation in the length of encoding of the data points assignement to the Gaussians. This variation is calculated by the following method :" Inliers_Variation_Index_term_cost2(float* aux)".
  • the variation of the encoding of the data points according to the so defined Gaussian model calculated by the following method "Inliers_Variation_Error_term_cost4(float * SumErrorRatio)". This is the varaiation of the likelihood parameter.

Definition at line 1079 of file Inliers.cpp.


The documentation for this class was generated from the following files:
Generated on Thu Feb 17 11:01:08 2005 for Gaussian Mixture Modeling by the MDL principle by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002