pub struct TylerFit { /* private fields */ }Expand description
A fitted Tyler shape estimate.
Tyler estimates shape only: shape is normalized to unit
determinant and carries no scale. A consequence is that its Mahalanobis
distances are correct for ranking observations but are not
χ²_p-calibrated; for N(0, Σ) data their squared distances are the
Gaussian χ²_p distances times the unidentified factor det(Σ)^{1/p} (so the
distances themselves scale by det(Σ)^{1/(2p)}) and for non-Gaussian
elliptical data the χ² shape does not apply at all. TylerFit therefore
does not implement RobustScatter
and offers no default Gaussian outlier map, mirroring how the regression
LtsFit declines the ρ-derived efficiency it
cannot report. Rank with distances, or opt in explicitly
via outliers_assuming_chi2_radial.
Implementations§
Source§impl TylerFit
impl TylerFit
Sourcepub fn location(&self) -> &Array1<f64>
pub fn location(&self) -> &Array1<f64>
The robust centre μ̂ (the supplied location, or the coordinatewise median).
Sourcepub fn shape(&self) -> &Array2<f64>
pub fn shape(&self) -> &Array2<f64>
The unit-determinant shape matrix V̂ (det V̂ = 1; no scale identified).
Sourcepub fn distances(&self) -> &Array1<f64>
pub fn distances(&self) -> &Array1<f64>
Robust Mahalanobis distances from the shape. Correct for ranking
observations, but not χ²_p-calibrated (the scale is unidentified).
Sourcepub fn outliers_assuming_chi2_radial(&self, quantile: f64) -> Vec<bool>
pub fn outliers_assuming_chi2_radial(&self, quantile: f64) -> Vec<bool>
Flag outliers by comparing the Tyler distances to the Gaussian cutoff
√χ²_{p, quantile}.
As the name says, this assumes a χ²-radial model (e.g. Gaussian) (the
assumption Tyler’s shape estimate exists to avoid) and disregards the
unidentified squared-distance factor det(Σ)^{1/p}, so the cutoff is
meaningful only under that model. It is an opt-in for the Gaussian case;
for distribution-free use, threshold distances
directly. An empirical quantile flags a fixed proportion of points
(≈ 1 − quantile) whether or not any are outliers, unlike this absolute
χ² cutoff, which flags ≈ none of clean Gaussian data.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TylerFit
impl RefUnwindSafe for TylerFit
impl Send for TylerFit
impl Sync for TylerFit
impl Unpin for TylerFit
impl UnsafeUnpin for TylerFit
impl UnwindSafe for TylerFit
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more