pub struct ScatterFit {
pub location: Array1<f64>,
pub scatter: Array2<f64>,
pub distances: Array1<f64>,
pub weights: Array1<f64>,
}Expand description
A fitted robust location–scatter estimate.
The shared result type of MScatter and Ogk. FAST-MCD carries extra
structure (a raw estimate and the retained subset), so it returns its own
McdFit, but that type implements RobustScatter too, so all three are
interchangeable behind the trait and the Mahalanobis/outlier map is written
once against (μ̂, Σ̂). Tyler does not use this type: it returns a
bespoke TylerFit implementing no shared trait, because its shape-only
distances are not χ²-calibrated, so this type’s Gaussian outlier map would
misapply to them.
Fields§
§location: Array1<f64>Robust location estimate μ̂ (a p-vector).
scatter: Array2<f64>Robust scatter (covariance) estimate Σ̂ (p × p, symmetric positive
definite).
distances: Array1<f64>Robust Mahalanobis distances dᵢ of the rows the fit was computed on.
weights: Array1<f64>Final per-observation weights (their meaning is estimator-specific: a
hard 0/1 acceptance for a reweighting estimator, a smooth w(dᵢ) for
an M-estimator).
Trait Implementations§
Source§impl Clone for ScatterFit
impl Clone for ScatterFit
Source§fn clone(&self) -> ScatterFit
fn clone(&self) -> ScatterFit
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ScatterFit
impl Debug for ScatterFit
Source§impl RobustScatter for ScatterFit
impl RobustScatter for ScatterFit
Source§fn distance_cutoff(&self, quantile: f64) -> f64
fn distance_cutoff(&self, quantile: f64) -> f64
√χ²_{p, quantile} (e.g. quantile = 0.975) against
which robust Mahalanobis distances are compared to flag outliers.Auto Trait Implementations§
impl Freeze for ScatterFit
impl RefUnwindSafe for ScatterFit
impl Send for ScatterFit
impl Sync for ScatterFit
impl Unpin for ScatterFit
impl UnsafeUnpin for ScatterFit
impl UnwindSafe for ScatterFit
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