|
Isis 3.0 Developer's Reference (API) |
Home |
00001 #ifndef MaximumLikelihoodWFunctions_h 00002 #define MaximumLikelihoodWFunctions_h 00003 00027 namespace Isis { 00047 class MaximumLikelihoodWFunctions { 00048 public: 00053 enum Model { 00054 00061 Huber, 00062 00069 HuberModified, 00070 00079 Welsch, 00080 00088 Chen 00089 }; 00090 00091 MaximumLikelihoodWFunctions() {this->setModel(Huber);}; //choose Model and define the tweaking constant 00092 MaximumLikelihoodWFunctions(Model modelSelection, double tweakingConstant); //choose Model and define the tweaking constant 00093 MaximumLikelihoodWFunctions(Model modelSelection); //choose Model and and use the default tweaking constant 00094 ~MaximumLikelihoodWFunctions() {}; //empty destructor 00095 00096 bool setModel(Model modelSelection, double tweakingConstant); //choose Model and define the tweaking constant 00097 bool setModel(Model modelSelection); //choose Model and use default tweaking constant 00098 bool setTweakingConstant(double tweakingConstant); //leave model type unaltered and change tweaking constant 00099 bool setTweakingConstantDefault(); //reset tweaking constant to the default for the current model 00100 00101 //the W functions provide an additional weighting factor W which is used to 're-weight' each observation dynamically during an adjustment, the scalar functions provide access to various flavors of this scalar (as a function of the residual divided by the residuals sigma) 00102 double sqrtWeightScaler(double residualZScore); //it is often convient to use square roots of weights when building normals, this function provides the scaler for the square root of the weight directly 00103 00104 double tweakingConstantQuantile(); //returns which quantile of the residuals is recommended to use as the tweaking constant, this varies as a function of the model being employed 00105 00106 double tweakingConstant(); 00107 00108 void maximumLikelihoodModel(char *model); 00109 00110 void weightedResidualCutoff(char *cutoff); 00111 00112 private: 00119 double m_c; //the tweaking constant for the maximum likelihood models 00120 00123 double m_PI; //PI 00124 00127 Model m_model; //selected maximum likelihood estimation model 00128 00129 00130 double weightScaler(double residualZScore); //This directly provides the scaler for the weight (instead of the radical weight), thus it provides sqrtWeightScaler^2 00131 00132 double huber(double residualZScore); 00133 double huberModified(double residualZScore); 00134 double welsch(double residualZScore); 00135 double chen(double residualZScore); 00136 }; 00137 }// end namespace Isis 00138 00139 #endif