File failed to load: https://isis.astrogeology.usgs.gov/3.9.0/Object/assets/jax/output/NativeMML/config.js
Isis 3 Developer Reference
MaximumLikelihoodWFunctions.h
Go to the documentation of this file.
1 #ifndef MaximumLikelihoodWFunctions_h
2 #define MaximumLikelihoodWFunctions_h
3 
27 #include <QString>
28 
29 namespace Isis {
65  public:
69  // Each model has an accompannying private method that converts from a
70  // resiuduals to a weight scaler.
71  enum Model {
72 
81 
89 
100 
110  };
111  static QString modelToString(Model model);
112  static MaximumLikelihoodWFunctions::Model stringToModel(QString modelName);
113 
115  MaximumLikelihoodWFunctions(Model modelSelection);
116  MaximumLikelihoodWFunctions(Model modelSelection, double tweakingConstant);
120 
121  void setModel(Model modelSelection); // uses default tweaking constant
123 
124  void setModel(Model modelSelection, double tweakingConstant);
126 
127  Model model() const;
128  double tweakingConstant() const;
129 
130  // the W functions provide an additional weighting factor W which is used
131  // to 're-weight' each observation dynamically during an adjustment, the
132  // scalar functions provide access to various flavors of this scalar (as
133  // a function of the residual divided by the residuals sigma)
134 
135  double sqrtWeightScaler(double residualZScore); //it is often convient to use square roots of
136  //weights when building normals, this function
137  // provides the scaler for the square root of
138  // the weight directly
139  double tweakingConstantQuantile(); // returns which quantile of the residuals is recommended to
140  // use as the tweaking constant, this varies as a function of
141  // the model being employed
142 
143  QString weightedResidualCutoff();
144 
145  QDataStream &write(QDataStream &stream) const;
146  QDataStream &read(QDataStream &stream);
147 
148  private:
149  double weightScaler(double residualZScore); // This directly provides the scaler for the weight
150  // (instead of the radical weight), thus it provides
151  // sqrtWeightScaler^2
152  double huber(double residualZScore);
153  double huberModified(double residualZScore);
154  double welsch(double residualZScore);
155  double chen(double residualZScore);
156 
157  Model m_model;
158  double m_tweakingConstant;
166  };
167  // operators to read/write to/from binary data
168  QDataStream &operator<<(QDataStream &stream, const MaximumLikelihoodWFunctions &mlwf);
169  QDataStream &operator>>(QDataStream &stream, MaximumLikelihoodWFunctions &mlwf);
170 
171  QDataStream &operator<<(QDataStream &stream, const MaximumLikelihoodWFunctions::Model &modelEnum);
172  QDataStream &operator>>(QDataStream &stream, MaximumLikelihoodWFunctions::Model &modelEnum);
173 
174 };// end namespace Isis
175 
176 #endif
void setTweakingConstant(double tweakingConstant)
Allows the tweaking constant to be changed without changing the maximum likelihood function...
Definition: MaximumLikelihoodWFunctions.cpp:148
~MaximumLikelihoodWFunctions()
Definition: MaximumLikelihoodWFunctions.cpp:61
double tweakingConstantQuantile()
Suggest a quantile of the probility distribution of the residuals to use as the tweaking constants ba...
Definition: MaximumLikelihoodWFunctions.cpp:316
double sqrtWeightScaler(double residualZScore)
This provides the scaler to the sqrt of the weight, which is very useful for building normal equation...
Definition: MaximumLikelihoodWFunctions.cpp:209
QDataStream & read(QDataStream &stream)
Definition: MaximumLikelihoodWFunctions.cpp:419
According to Zhang (Parameter Estimation: A Tutorial with application to conic fitting) "[Huber&#39;s] es...
Definition: MaximumLikelihoodWFunctions.h:80
QString weightedResidualCutoff()
Method to return a string represtentation of the weighted residual cutoff (if it exists) for the Maxi...
Definition: MaximumLikelihoodWFunctions.cpp:391
Model
The supported maximum likelihood estimation models.
Definition: MaximumLikelihoodWFunctions.h:71
QDataStream & write(QDataStream &stream) const
Definition: MaximumLikelihoodWFunctions.cpp:411
The Chen method was found in "Robust Regression with Projection Based M-estimators" Chen...
Definition: MaximumLikelihoodWFunctions.h:109
A modification to Huber&#39;s method propsed by William J.J.
Definition: MaximumLikelihoodWFunctions.h:88
The Welsch method aggresively discounts measures with large resiudals.
Definition: MaximumLikelihoodWFunctions.h:99
void setModel(Model modelSelection)
Allows the maximum likelihood model to be changed together and the default tweaking constant to be se...
Definition: MaximumLikelihoodWFunctions.cpp:79
MaximumLikelihoodWFunctions()
Sets up a maximumlikelihood estimation function with Huber model and default tweaking constant...
Definition: MaximumLikelihoodWFunctions.cpp:17
void setTweakingConstantDefault()
Sets default tweaking constants based on the maximum likelihood estimation model being used...
Definition: MaximumLikelihoodWFunctions.cpp:90
std::istream & operator>>(std::istream &is, CSVReader &csv)
Input read operator for input stream sources.
Definition: CSVReader.cpp:463
Class provides maximum likelihood estimation functions for robust parameter estimation, e.g.
Definition: MaximumLikelihoodWFunctions.h:64
MaximumLikelihoodWFunctions & operator=(const MaximumLikelihoodWFunctions &other)
Definition: MaximumLikelihoodWFunctions.cpp:65
Model model() const
Accessor method to return the MaximumLikelihoodWFunctions::Model enumeration.
Definition: MaximumLikelihoodWFunctions.cpp:405
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31
double tweakingConstant() const
Returns the current tweaking constant.
Definition: MaximumLikelihoodWFunctions.cpp:162
static QString modelToString(Model model)
Static method to return a string represtentation for a given MaximumLikelihoodWFunctions::Model enum...
Definition: MaximumLikelihoodWFunctions.cpp:347
QDebug operator<<(QDebug debug, const Hillshade &hillshade)
Print this class out to a QDebug object.
Definition: Hillshade.cpp:308
static MaximumLikelihoodWFunctions::Model stringToModel(QString modelName)
Definition: MaximumLikelihoodWFunctions.cpp:359

U.S. Department of the Interior | U.S. Geological Survey
ISIS | Privacy & Disclaimers | Astrogeology Research Program
To contact us, please post comments and questions on the USGS Astrogeology Discussion Board
To report a bug, or suggest a feature go to: ISIS Github
File Modified: 07/12/2023 23:23:45