USGS

Isis 3.0 Object Programmers' Reference

Home

Isis::MaximumLikelihoodWFunctions Class Reference

Class provides maximum likelihood estimation functions for robust parameter estimation e.g. More...

#include <MaximumLikelihoodWFunctions.h>

Collaboration diagram for Isis::MaximumLikelihoodWFunctions:
Collaboration graph

Public Types

enum  Model { Huber, HuberModified, Welsch, Chen }
 These are/supported maximum likelihood estimation models, each has an accompannying private method that converts from a resiuduals to a weight scaler. More...
 

Public Member Functions

 MaximumLikelihoodWFunctions (Model modelSelection, double tweakingConstant)
 Sets up a maximumlikelihood estimation function with specified model and tweaking constant.
 
 MaximumLikelihoodWFunctions (Model modelSelection)
 Sets up a maximumlikelihood estimation function with specified model and default tweaking constant.
 
bool setModel (Model modelSelection, double tweakingConstant)
 Allows the maximum likelihood model to be changed together with the tweaking constant.
 
bool setModel (Model modelSelection)
 Allows the maximum likelihood model to be changed together and the default tweaking constant to be set.
 
bool setTweakingConstant (double tweakingConstant)
 Allows the tweaking constant to be changed without changing the maximum likelihood function.
 
bool setTweakingConstantDefault ()
 Sets defualt tweaking constants based on the maximum likelihood estimation model being used.
 
double sqrtWeightScaler (double residualZScore)
 This provides the scaler to the sqrt of the weight (which is very useful for building normal equations)
 
double tweakingConstantQuantile ()
 Suggest a quantile of the probility distribution of the residuals to use as the tweaking constants based on the maximum likelihood estimation model being used.
 
double tweakingConstant ()
 Returns the current tweaking constant.
 
void maximumLikelihoodModel (char *model)
 
void weightedResidualCutoff (char *cutoff)
 

Private Member Functions

double weightScaler (double residualZScore)
 This prvoides the scalar for the weight (not the scaler for the square root of the weight, which is generally more useful)
 
double huber (double residualZScore)
 Huber maximum likelihood estimation function evaluation.
 
double huberModified (double residualZScore)
 Modified Huber maximum likelihood estimation function evaluation.
 
double welsch (double residualZScore)
 Modified Huber maximum likelihood estimation function evaluation.
 
double chen (double residualZScore)
 Modified Huber maximum likelihood estimation function evaluation.
 

Private Attributes

double m_c
 Tweaking constant for the maximum likelihood estimation function Suggested values are available for each method: setTweakingConstantDefault() They can also be manually adjusted: setTweakingConstant(double tweakingConstant) If there is knowlege of the probility distrubtion of the residuals in an adjustement tweakingConstantQuantile() will recommend what qunatile to use as the tweaking constant;.
 
double m_PI
 the constant pi, so it only has to calculated one
 
Model m_model
 Which maximum likelihood model is being used.
 

Detailed Description

Class provides maximum likelihood estimation functions for robust parameter estimation e.g.

in bundle adjustment.

A maximum likelihood estimation W function provides a scheme for 're-weighting' observations so that measures with large residuals have reduced or negligible effect on the solution. There are many such functions available, a few have been programmed into this class. See enum Model documentation for specifics of the estimation models. References: Zhangs, "Parameter Estimation: A Tutorial with Application to Conic Fitting" Koch, "Parameter Estimation and Hypothesis Testing in Linear Systems" 2nd edition chapter 3.8 Manual of Photogrammetry 5th edition chapter 2.2 (particularly 2.2.6) Chen "Robust Regression with Projection Based M-estimators"

Author
2012-03-23 Orrin Thomas
History:
2012-03-23 Orrin Thomas – Original Version

Definition at line 47 of file MaximumLikelihoodWFunctions.h.

Member Enumeration Documentation

These are/supported maximum likelihood estimation models, each has an accompannying private method that converts from a resiuduals to a weight scaler.

Enumerator
Huber 

According to Zhang (Parameter Estimation: A Tutorial with application to conic fitting) "[Huber's] estimator is so satisfactory this is has been recommended for almost all situations; very rarely has it been found to be inferior to some other function.

" Its one deficiency is the discontinuous second derivative which cause rare diffeculites. No measures are totally disregarded. http://research.microsoft.com/en-us/um/people/zhang/Papers/ZhangIVC-97-01.pdf

HuberModified 

A modification to Huber's method propsed by William J.J.

Rey in Introduction to Robust and Quasi-Robust Statistical Methods. Springer, Berlin, Heidelberg, 1983. It has similiar properties to the Huber, but with a continuous second derivative. This comes at the cost of being somewhat more computationally expernsive. No measures are totally disregarded. http://research.microsoft.com/en-us/um/people/zhang/Papers/ZhangIVC-97-01.pdf

Welsch 

The Welsch method aggresively discounts measures with large resiudals.

Residuals two times greater than the tweaking constant are all but ignored. This method can be risky to use (at least at first) because it does not gaurantee a unique solution. And if sufficient measures are effectively 'removed' by the weighting, the system can become singular. The manual of photogrammetry recommended using it for clean up after convergeance or near convergeance had been optained with a more stable method (such as Huber's). http://research.microsoft.com/en-us/um/people/zhang/Papers/ZhangIVC-97-01.pdf

Chen 

The Chen method was found in "Robust Regression with Projection Based M-estimators" Chen, et.

al., though Chen does not take credit as the author. It was of interest because he seemed to present its use as expected in systems with large numbers of outliers, and because of it's unique properties. It is exceptionally aggresive. Residuals less than the tweaking constant generally have MORE influence than in standard least squares (or any other estimation function I've studied), and residuals larger than the tweaking function are totaly discounted.

Definition at line 53 of file MaximumLikelihoodWFunctions.h.

Constructor & Destructor Documentation

Isis::MaximumLikelihoodWFunctions::MaximumLikelihoodWFunctions ( Model  modelSelection,
double  tweakingConstant 
)

Sets up a maximumlikelihood estimation function with specified model and tweaking constant.

Parameters
[in]enumModel modelSelection, the model to be used (see documentation for enum Model)
[in]doubletweaking constant, exact meaning varies by model, but generally the larger the value the more influence larger resiudals have on the solution. As well as possiblely the more measures are included in the solution.
Exceptions
IsisProgrammerErrorif tweakingConstant <= 0.0

Definition at line 16 of file MaximumLikelihoodWFunctions.cpp.

References _FILEINFO_, m_c, m_model, m_PI, Isis::IException::Programmer, and tweakingConstant().

Isis::MaximumLikelihoodWFunctions::MaximumLikelihoodWFunctions ( Model  modelSelection)

Sets up a maximumlikelihood estimation function with specified model and default tweaking constant.

Parameters
[in]enumModel modelSelection, the model to be used (see documentation for enum Model)

Definition at line 32 of file MaximumLikelihoodWFunctions.cpp.

References m_model, m_PI, and setTweakingConstantDefault().

Member Function Documentation

double Isis::MaximumLikelihoodWFunctions::chen ( double  residualZScore)
private

Modified Huber maximum likelihood estimation function evaluation.

For details see documentation of enum Model

Parameters
[in]doubleresidualZScore, this the residual of a particulare measure in a particular iteration divided by the standard deviation (sigma) of that measure
Returns
double the scaler adjustment to the weight for the measure nominal weight = 1 /sigma/sigma and weight' = scaler/sigma/sigma

Definition at line 212 of file MaximumLikelihoodWFunctions.cpp.

References m_c.

Referenced by weightScaler().

double Isis::MaximumLikelihoodWFunctions::huber ( double  residualZScore)
private

Huber maximum likelihood estimation function evaluation.

For details see documentation of enum Model

Parameters
[in]doubleresidualZScore, this the residual of a particulare measure in a particular iteration divided by the standard deviation (sigma) of that measure
Returns
double the scaler adjustment to the weight for the measure nominal weight = 1 /sigma/sigma and weight' = scaler/sigma/sigma

Definition at line 177 of file MaximumLikelihoodWFunctions.cpp.

References m_c.

Referenced by weightScaler().

double Isis::MaximumLikelihoodWFunctions::huberModified ( double  residualZScore)
private

Modified Huber maximum likelihood estimation function evaluation.

For details see documentation of enum Model

Parameters
[in]doubleresidualZScore, this the residual of a particulare measure in a particular iteration divided by the standard deviation (sigma) of that measure
Returns
double the scaler adjustment to the weight for the measure nominal weight = 1 /sigma/sigma and weight' = scaler/sigma/sigma

Definition at line 189 of file MaximumLikelihoodWFunctions.cpp.

References m_c, and m_PI.

Referenced by weightScaler().

bool Isis::MaximumLikelihoodWFunctions::setModel ( Model  modelSelection,
double  tweakingConstant 
)

Allows the maximum likelihood model to be changed together with the tweaking constant.

Parameters
[in]enumModel modelSelection, the model to be used (see documentation for enum Model)
[in]doubletweaking constant, exact meaning varies by model, but generally the larger the value the more influence larger resiudals have on the solution. As well as possiblely the more measures are included in the solution.
Exceptions
IsisProgrammerErrorif tweakingConstant <= 0.0

Definition at line 47 of file MaximumLikelihoodWFunctions.cpp.

References _FILEINFO_, m_c, m_model, Isis::IException::Programmer, and tweakingConstant().

bool Isis::MaximumLikelihoodWFunctions::setModel ( Model  modelSelection)

Allows the maximum likelihood model to be changed together and the default tweaking constant to be set.

[in] enum Model modelSelection, the model to be used (see documentation for enum Model)

Definition at line 64 of file MaximumLikelihoodWFunctions.cpp.

References m_model, and setTweakingConstantDefault().

bool Isis::MaximumLikelihoodWFunctions::setTweakingConstant ( double  tweakingConstant)

Allows the tweaking constant to be changed without changing the maximum likelihood function.

Parameters
[in]doubletweaking constant, exact meaning varies by model, but generally the larger the value the more influence larger resiudals have on the solution. As well as possiblely the more measures are included in the solution.
Exceptions
IsisProgrammerErrorif tweakingConstant <= 0.0

Definition at line 97 of file MaximumLikelihoodWFunctions.cpp.

References _FILEINFO_, m_c, Isis::IException::Programmer, and tweakingConstant().

bool Isis::MaximumLikelihoodWFunctions::setTweakingConstantDefault ( )

Sets defualt tweaking constants based on the maximum likelihood estimation model being used.

Definition at line 222 of file MaximumLikelihoodWFunctions.cpp.

References Chen, Huber, HuberModified, m_c, m_model, and Welsch.

Referenced by MaximumLikelihoodWFunctions(), and setModel().

double Isis::MaximumLikelihoodWFunctions::sqrtWeightScaler ( double  residualZScore)

This provides the scaler to the sqrt of the weight (which is very useful for building normal equations)

Parameters
[in]doubleresidualZScore, this the residual of a particulare measure in a particular iteration divided by the standard deviation (sigma) of that measure
Returns
double the scaler adjustment to the sqrt of the weight for the measure nominal sqrt(weight) = 1 /sigma and sqrt(weight') = scaler/sigma

Definition at line 164 of file MaximumLikelihoodWFunctions.cpp.

References weightScaler().

double Isis::MaximumLikelihoodWFunctions::tweakingConstant ( )

Returns the current tweaking constant.

Definition at line 111 of file MaximumLikelihoodWFunctions.cpp.

References m_c.

Referenced by MaximumLikelihoodWFunctions(), setModel(), and setTweakingConstant().

double Isis::MaximumLikelihoodWFunctions::tweakingConstantQuantile ( )

Suggest a quantile of the probility distribution of the residuals to use as the tweaking constants based on the maximum likelihood estimation model being used.

Returns
double quantile [0,1] the value pretaining to this quantile (in the probility distribution of the residuals) should be used as the tweaking constant

Definition at line 249 of file MaximumLikelihoodWFunctions.cpp.

References Chen, Huber, HuberModified, m_model, and Welsch.

double Isis::MaximumLikelihoodWFunctions::weightScaler ( double  residualZScore)
private

This prvoides the scalar for the weight (not the scaler for the square root of the weight, which is generally more useful)

Parameters
[in]doubleresidualZScore, this the residual of a particulare measure in a particular iteration divided by the standard deviation (sigma) of that measure
Returns
double the scaler adjustment to the weight for the measure nominal weight = 1 /sigma/sigma and weight' = scaler/sigma/sigma

Definition at line 142 of file MaximumLikelihoodWFunctions.cpp.

References Chen, chen(), Huber, huber(), HuberModified, huberModified(), m_model, Welsch, and welsch().

Referenced by sqrtWeightScaler().

double Isis::MaximumLikelihoodWFunctions::welsch ( double  residualZScore)
private

Modified Huber maximum likelihood estimation function evaluation.

For details see documentation of enum Model

Parameters
[in]doubleresidualZScore, this the residual of a particulare measure in a particular iteration divided by the standard deviation (sigma) of that measure
Returns
double the scaler adjustment to the weight for the measure nominal weight = 1 /sigma/sigma and weight' = scaler/sigma/sigma

Definition at line 201 of file MaximumLikelihoodWFunctions.cpp.

References m_c.

Referenced by weightScaler().

Member Data Documentation

double Isis::MaximumLikelihoodWFunctions::m_c
private

Tweaking constant for the maximum likelihood estimation function Suggested values are available for each method: setTweakingConstantDefault() They can also be manually adjusted: setTweakingConstant(double tweakingConstant) If there is knowlege of the probility distrubtion of the residuals in an adjustement tweakingConstantQuantile() will recommend what qunatile to use as the tweaking constant;.

Definition at line 119 of file MaximumLikelihoodWFunctions.h.

Referenced by chen(), huber(), huberModified(), MaximumLikelihoodWFunctions(), setModel(), setTweakingConstant(), setTweakingConstantDefault(), tweakingConstant(), and welsch().

Model Isis::MaximumLikelihoodWFunctions::m_model
private

Which maximum likelihood model is being used.

Definition at line 127 of file MaximumLikelihoodWFunctions.h.

Referenced by MaximumLikelihoodWFunctions(), setModel(), setTweakingConstantDefault(), tweakingConstantQuantile(), and weightScaler().

double Isis::MaximumLikelihoodWFunctions::m_PI
private

the constant pi, so it only has to calculated one

Definition at line 123 of file MaximumLikelihoodWFunctions.h.

Referenced by huberModified(), and MaximumLikelihoodWFunctions().


The documentation for this class was generated from the following files: