pub struct Qn {
pub consistency: f64,
pub finite_sample_correction: bool,
}Expand description
Qn = c · dₙ · {|rᵢ − rⱼ| : i < j}₍ₖ₎, the k-th order statistic of the
pairwise absolute differences with k = C(⌊n/2⌋+1, 2) (≈ the ¼-quantile).
The constant c = 2.2219 = 1/(√2·Φ⁻¹(⅝)) gives consistency for σ at the
Gaussian; dₙ is a finite-sample correction (Croux & Rousseeuw 1992).
Uses no location step and stays smooth in the data, with ≈ 82% Gaussian efficiency and a 50% breakdown point (versus the MAD’s ≈ 37%).
Evaluated directly over all pairs in O(n²) time / O(n²) space; Rousseeuw
& Croux’s O(n log n) algorithm is a possible follow-up (the datasets here
are small).
Fields§
§consistency: f64Asymptotic consistency constant (default 2.2219).
finite_sample_correction: boolApply the finite-sample correction dₙ (default true).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Qn
impl RefUnwindSafe for Qn
impl Send for Qn
impl Sync for Qn
impl Unpin for Qn
impl UnsafeUnpin for Qn
impl UnwindSafe for Qn
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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