yat  0.21pre
Classes | Public Member Functions | List of all members
theplu::yat::statistics::TukeyBiweightEstimator Class Reference

Tukey's Biweight Estimator. More...

#include <yat/statistics/TukeyBiweightEstimator.h>

Classes

class  Stopper
 

Public Member Functions

 TukeyBiweightEstimator (double cutoff=4.685, bool sorted=false)
 Constructor. More...
 
template<typename RandomAccessIterator >
double operator() (RandomAccessIterator first, RandomAccessIterator last) const
 
template<typename RandomAccessIterator >
double operator() (RandomAccessIterator first, RandomAccessIterator last, Stopper &stopper) const
 

Detailed Description

Tukey's Biweight Estimator.

Calculates the estimate as a weighted sum $ m = \frac{\sum w_i(1-u_i^2)^2x_i}{\sum w_i(1-u_i^2)^2 } $

where the sums run over data points with |u|<1 and u is calculated as

$ u_i = \frac{x_i-m}{k*\textrm{mad}} $

As the estimate m also appears on right-hand side, the estimate is calculated in an iterative manner.

See also
regression::TukeyBiweight
mad
Since
New in yat 0.8

Constructor & Destructor Documentation

◆ TukeyBiweightEstimator()

theplu::yat::statistics::TukeyBiweightEstimator::TukeyBiweightEstimator ( double  cutoff = 4.685,
bool  sorted = false 
)
inlineexplicit

Constructor.

Parameters
cutoffdefines how close to the center (estimate) a data point needs to be (in terms of MADs) to influence the estimate.
sortedif true object presumes input is a sorted range; otherwise object creates a sorted copy of the range and base the computation on that.

Member Function Documentation

◆ operator()() [1/2]

template<typename RandomAccessIterator >
double theplu::yat::statistics::TukeyBiweightEstimator::operator() ( RandomAccessIterator  first,
RandomAccessIterator  last 
) const

Type Requirements:

Returns
Tukey's Biweight Estimate

◆ operator()() [2/2]

template<typename RandomAccessIterator >
double theplu::yat::statistics::TukeyBiweightEstimator::operator() ( RandomAccessIterator  first,
RandomAccessIterator  last,
TukeyBiweightEstimator::Stopper stopper 
) const
Since
New in yat 0.18

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

Generated on Wed Jan 25 2023 03:34:29 for yat by  doxygen 1.8.14