pub struct McdFit {
pub location: Array1<f64>,
pub scatter: Array2<f64>,
pub distances: Array1<f64>,
pub weights: Array1<f64>,
pub raw_location: Array1<f64>,
pub raw_scatter: Array2<f64>,
pub support: Vec<usize>,
pub coverage: usize,
pub objective: f64,
pub breakdown_point: f64,
}Expand description
A fitted Minimum Covariance Determinant estimate.
Like crate::regression::LtsFit, MCD carries more than the shared
ScatterFit triple, so it is its own type, but it
does implement RobustScatter, reporting the reweighted (RMCD)
location/scatter through it. The raw min-determinant estimate and the
retained subset remain available as fields for auditing.
Fields§
§location: Array1<f64>Reweighted (RMCD) location: the primary estimate.
scatter: Array2<f64>Reweighted (RMCD) covariance: the primary estimate.
distances: Array1<f64>Robust Mahalanobis distances w.r.t. the primary (location, scatter).
weights: Array1<f64>Reweighting weights: 1.0 for observations retained by the χ² cutoff,
0.0 for those rejected (all 1.0 when reweighting is disabled).
raw_location: Array1<f64>Raw (consistency-corrected) MCD location: the best h-subset mean.
raw_scatter: Array2<f64>Raw (consistency-corrected) MCD covariance: the min-determinant subset covariance times the consistency factor.
support: Vec<usize>The retained min-determinant h-subset (ascending indices).
coverage: usizeCoverage h.
objective: f64The MCD objective at the fit: log det of the raw (uncorrected) subset
covariance.
breakdown_point: f64Breakdown point (n − h + 1)/n.
Implementations§
Trait Implementations§
Source§impl RobustScatter for McdFit
impl RobustScatter for McdFit
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 McdFit
impl RefUnwindSafe for McdFit
impl Send for McdFit
impl Sync for McdFit
impl Unpin for McdFit
impl UnsafeUnpin for McdFit
impl UnwindSafe for McdFit
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