Robust¶
- class Robust(*args, **kwargs)¶
Bases:
pybind11_object
Contains an M-estimator and various influence function.
This class implements an M-estimator with Tukey, Cauchy or Huber influence function [8] which allow uncertain measures to be less likely considered and in some cases completely rejected, thus inferring that the data is not normally distributed.
When using a robust estimate of the mean, it is usual to normalize the distribution to center the data around zero. In the case of a median operator, the normalized residue is given by:
\(\overline{r_i} = r_i - {Med}(r_i)\) where \({Med}(r_i)\) is the median value of the residue vector \(r\) .
The Median Absolute Deviation (MAD) representing one standard deviation of the normal distribution is given by:
\[\sigma = 1.48 \; {Med}(|\overline{r_i}|) \]This class allows to set the minimum value of \(\sigma\) using setMinMedianAbsoluteDeviation() .
This estimated standard deviation \(\sigma\) can accordingly be used with a tuning variable for different influence functions.
Let us consider the weight function \(w(r)\) with \(r\) the residual vector of the parameters to estimate.
Using Huber influence function, with \(a\) a constant such as \(a=1.21 \; \sigma\) we have
\[\begin{split}w(r_i) = \left\{ \begin{array}{ll} 1 & \mbox{if } |r_i| \leq a \\\frac{a}{|r_i|} & \mbox{else} \end{array} \right. \end{split}\]Using Tukey influence function, with \(b\) a constant such as \(b=4.68 \; \sigma\) we have
\[\begin{split}w(r_i) = \left\{ \begin{array}{ll} {\left(1 - {\left(\frac{r_i}{b}\right)}^2 \right)}^2 & \mbox{if } |r_i| \leq b \\0 & \mbox{else} \end{array} \right. \end{split}\]Using Cauchy influence function, with \(c\) a constant such as \(c=2.38 \; \sigma\) we have
\[w(r_i) = \frac{1}{(1 + {(r_i/c)}^2)} \]
Given the influence function and the residual vector, the weights are updated in MEstimator() .
Overloaded function.
__init__(self: visp._visp.core.Robust) -> None
Default constructor.
__init__(self: visp._visp.core.Robust, other: visp._visp.core.Robust) -> None
Copy constructor.
Methods
Overloaded function.
Return residual vector Median Absolute Deviation (MAD).
Return the min value used to threshold residual vector Median Absolute Deviation (MAD).
Set minimal median absolute deviation (MAD) value corresponding to the minimal value of \(\sigma\) computed in MEstimator() with \(\sigma = 1.48{Med}(|r_i - {Med}(r_i)|)\) .
Inherited Methods
Operators
__doc__
Overloaded function.
__module__
Attributes
CAUCHY
HUBER
TUKEY
__annotations__
- class RobustEstimatorType(self, value: int)¶
Bases:
pybind11_object
Enumeration of influence functions.
Values:
TUKEY: Tukey influence function.
CAUCHY: Cauchy influence function.
HUBER: Huber influence function.
- MEstimator(self, method: visp._visp.core.Robust.RobustEstimatorType, residues: visp._visp.core.ColVector, weights: visp._visp.core.ColVector) None ¶
- __init__(*args, **kwargs)¶
Overloaded function.
__init__(self: visp._visp.core.Robust) -> None
Default constructor.
__init__(self: visp._visp.core.Robust, other: visp._visp.core.Robust) -> None
Copy constructor.
- getMedianAbsoluteDeviation(self) float ¶
Return residual vector Median Absolute Deviation (MAD). This value is updated after a call to MEstimator() . It corresponds to value of \(\sigma = 1.48{Med}(|r_i - {Med}(r_i)|)\) . This value cannot be lower than the min value returned by getMinMedianAbsoluteDeviation() or set with setMinMedianAbsoluteDeviation() .
Note
See setMinMedianAbsoluteDeviation()
- getMinMedianAbsoluteDeviation(self) float ¶
Return the min value used to threshold residual vector Median Absolute Deviation (MAD). This value corresponds to the minimal value of \(\sigma\) computed in MEstimator() .
Note
See setMinMedianAbsoluteDeviation()