#include <Inliers.hh>
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_Vector * | A |
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 | |
Outliers * | O_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. |
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 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.
Definition at line 26 of file Inliers.cpp. |
|
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
Definition at line 76 of file Inliers.cpp. |
|
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.
Definition at line 961 of file Inliers.cpp. |
|
Method calculating the likelihood code length variation for the inliers which are not belonging to simulated removed Gaussians.
Definition at line 998 of file Inliers.cpp. |
|
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. |
|
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).
Definition at line 1044 of file Inliers.cpp. |
|
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).
Definition at line 904 of file Inliers.cpp. |
|
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. |
|
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. |
|
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.
Definition at line 314 of file Inliers.cpp. |
|
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.
Definition at line 266 of file Inliers.cpp. |
|
Removal of the k th component of the mixture.
Definition at line 489 of file Inliers.cpp. |
|
Removal of all the component of the mixture which do not contain any data points.
Definition at line 477 of file Inliers.cpp. |
|
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. |
|
removes the Gaussian component inducing the maximum decrease of the 2 part MDL code. The 2 part code length variation is composed of
Definition at line 1079 of file Inliers.cpp. |