pub struct MEstimator<R, S> {
pub rho: R,
pub scale: S,
pub control: Control,
}Expand description
A configured regression M-estimator: a loss, a scale estimator and solver
controls. Call MEstimator::fit to fit it to data.
Fields§
§rho: RThe robust loss.
scale: SThe scale estimator used to standardize residuals.
control: ControlConvergence controls.
Implementations§
Source§impl<R, S> MEstimator<R, S>
impl<R, S> MEstimator<R, S>
Sourcepub fn fit(
&self,
x: &Array2<f64>,
y: &Array1<f64>,
) -> Result<RegressionFit, RobustError>
pub fn fit( &self, x: &Array2<f64>, y: &Array1<f64>, ) -> Result<RegressionFit, RobustError>
Fit by IRLS: standardize residuals by the scale, form the weights
wᵢ = ρ.weight(rᵢ/s), solve the weighted least squares, repeat.
Auto Trait Implementations§
impl<R, S> Freeze for MEstimator<R, S>
impl<R, S> RefUnwindSafe for MEstimator<R, S>where
R: RefUnwindSafe,
S: RefUnwindSafe,
impl<R, S> Send for MEstimator<R, S>
impl<R, S> Sync for MEstimator<R, S>
impl<R, S> Unpin for MEstimator<R, S>
impl<R, S> UnsafeUnpin for MEstimator<R, S>where
R: UnsafeUnpin,
S: UnsafeUnpin,
impl<R, S> UnwindSafe for MEstimator<R, S>where
R: UnwindSafe,
S: UnwindSafe,
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> 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