pub struct Mcd { /* private fields */ }Expand description
A configured FAST-MCD estimator.
Reproducible by default (a fixed-seed rand_chacha::ChaCha8Rng sub-stream
per random start, so results are thread-count invariant even with the
rayon feature on); configure with Mcd::seed / Mcd::fit_with_rng.
Implementations§
Source§impl Mcd
impl Mcd
Sourcepub fn coverage(self, fraction: f64) -> Self
pub fn coverage(self, fraction: f64) -> Self
Retain a fraction ∈ (0.5, 1] of the observations instead of the
max-breakdown default; the coverage is h = ⌊fraction · n⌋ (clamped to
[p + 1, n]). Larger fraction trades breakdown for efficiency.
Sourcepub fn n_subsamples(self, n: usize) -> Self
pub fn n_subsamples(self, n: usize) -> Self
Set the number of random elemental starts (default 500).
Sourcepub fn reweight(self, on: bool) -> Self
pub fn reweight(self, on: bool) -> Self
Enable or disable the one-step reweighting (default true).
Sourcepub fn seed(self, seed: u64) -> Self
pub fn seed(self, seed: u64) -> Self
Set the master RNG seed (default is a fixed internal constant).
Sourcepub fn control(self, control: Control) -> Self
pub fn control(self, control: Control) -> Self
Override the concentration-loop convergence control.
Sourcepub fn fit(&self, x: &Array2<f64>) -> Result<McdFit, RobustError>
pub fn fit(&self, x: &Array2<f64>) -> Result<McdFit, RobustError>
Fit reproducibly from the configured seed.
Sourcepub fn fit_with_rng<G: Rng>(
&self,
x: &Array2<f64>,
rng: &mut G,
) -> Result<McdFit, RobustError>
pub fn fit_with_rng<G: Rng>( &self, x: &Array2<f64>, rng: &mut G, ) -> Result<McdFit, RobustError>
Fit drawing the master seed from a caller-supplied generator.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Mcd
impl RefUnwindSafe for Mcd
impl Send for Mcd
impl Sync for Mcd
impl Unpin for Mcd
impl UnsafeUnpin for Mcd
impl UnwindSafe for Mcd
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