Jpp master_rocky-44-g75b7c4f75
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 105 of file JMEstimator.hh.

Constructor & Destructor Documentation

◆ JMEstimatorTukey()

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

Constructor.

Parameters
kstandard deviation

Definition at line 113 of file JMEstimator.hh.

113 :
114 k(k)
115 {}

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 117 of file JMEstimator.hh.

118 {
119 const double w = 0.5 * k*k / 3.0;
120
121 if (fabs(z) < k) {
122
123 const double u = z/k;
124 const double v = 1.0 - u*u;
125
126 return w * (1.0 - v*v*v);
127 }
128
129 return w;
130 }
data_type w[N+1][M+1]
Definition JPolint.hh:867
double u[N+1]
Definition JPolint.hh:865
data_type v[N+1][M+1]
Definition JPolint.hh:866

◆ 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 132 of file JMEstimator.hh.

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

Member Data Documentation

◆ k

double JFIT::JMEstimatorTukey::k

Definition at line 145 of file JMEstimator.hh.


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