Jpp 19.3.0-rc.3
the software that should make you happy
Loading...
Searching...
No Matches
JFIT::JMEstimatorTukey Struct Reference

Tukey's biweight M-estimator. More...

#include <JMEstimator.hh>

Inheritance diagram for JFIT::JMEstimatorTukey:
JFIT::JMEstimator

Public Member Functions

 JMEstimatorTukey (const double k)
 Constructor.
 
virtual double getRho (const double z) const override
 Get maximum likelihood estimate.
 
virtual double getPsi (const double z) const override
 Get derivative of maximum likelihood estimate.
 

Public Attributes

double k
 

Detailed Description

Tukey's biweight M-estimator.

This estimator produces a redescending dependence for large deviations.

Definition at line 108 of file JMEstimator.hh.

Constructor & Destructor Documentation

◆ JMEstimatorTukey()

JFIT::JMEstimatorTukey::JMEstimatorTukey ( const double k)
inline

Constructor.

Parameters
kstandard deviation

Definition at line 116 of file JMEstimator.hh.

116 :
117 k(k)
118 {}

Member Function Documentation

◆ getRho()

virtual double JFIT::JMEstimatorTukey::getRho ( const double z) const
inlineoverridevirtual

Get maximum likelihood estimate.

Parameters
zdeviation
Returns
likelihood

Implements JFIT::JMEstimator.

Definition at line 120 of file JMEstimator.hh.

121 {
122 const double w = 0.5 * k*k / 3.0;
123
124 if (fabs(z) < k) {
125
126 const double u = z/k;
127 const double v = 1.0 - u*u;
128
129 return w * (1.0 - v*v*v);
130 }
131
132 return w;
133 }

◆ getPsi()

virtual double JFIT::JMEstimatorTukey::getPsi ( const double z) const
inlineoverridevirtual

Get derivative of maximum likelihood estimate.

Parameters
zdeviation
Returns
derivative

Implements JFIT::JMEstimator.

Definition at line 135 of file JMEstimator.hh.

136 {
137 if (fabs(z) < k) {
138
139 const double u = z/k;
140 const double v = 1.0 - u*u;
141
142 return z * v*v;
143 }
144
145 return 0.0;
146 }

Member Data Documentation

◆ k

double JFIT::JMEstimatorTukey::k

Definition at line 148 of file JMEstimator.hh.


The documentation for this struct was generated from the following file: