pub struct RegressionFit {
pub coefficients: Array1<f64>,
pub scale: Scale,
pub residuals: Array1<f64>,
pub weights: Array1<f64>,
pub rho: Box<dyn RhoFunction>,
pub breakdown_point: f64,
}Expand description
A fitted robust regression, carrying enough state to report the theory.
Fields§
§coefficients: Array1<f64>Estimated coefficients.
scale: ScaleEstimated residual scale.
residuals: Array1<f64>Residuals y − Xβ̂.
weights: Array1<f64>Final IRLS weights.
rho: Box<dyn RhoFunction>The loss used, retained so influence/efficiency can be reported. This is the estimator’s final-stage loss (e.g. the M-step biweight for MM), so the reported efficiency and covariance describe the delivered fit.
breakdown_point: f64Asymptotic breakdown point ε*, carried as data set by the producing
estimator, not derived from rho, since ρ alone does not determine an
estimator’s breakdown. Plain M-regression sets 0.0 (leverage); S/MM set
min(δ/ρ_sup, 1 − δ/ρ_sup).
Trait Implementations§
Source§impl RobustEstimator for RegressionFit
impl RobustEstimator for RegressionFit
Source§fn coefficients(&self) -> &Array1<f64>
fn coefficients(&self) -> &Array1<f64>
Estimated coefficients.
Source§fn influence_function(&self) -> Box<dyn Fn(f64) -> f64 + '_>
fn influence_function(&self) -> Box<dyn Fn(f64) -> f64 + '_>
The influence function
x ↦ ψ(x)/E[ψ'].Source§fn asymptotic_variance(&self) -> f64
fn asymptotic_variance(&self) -> f64
Asymptotic variance
E[ψ²]/(E[ψ'])².Source§fn gaussian_efficiency(&self) -> f64
fn gaussian_efficiency(&self) -> f64
Efficiency relative to the Gaussian MLE.
Source§fn coef_covariance(&self, x: &Array2<f64>) -> Array2<f64>
fn coef_covariance(&self, x: &Array2<f64>) -> Array2<f64>
Approximate coefficient covariance
ŝ²·V·(XᵀX)⁻¹.Source§fn breakdown_point(&self) -> f64
fn breakdown_point(&self) -> f64
Asymptotic breakdown point.
Auto Trait Implementations§
impl !RefUnwindSafe for RegressionFit
impl !Send for RegressionFit
impl !Sync for RegressionFit
impl !UnwindSafe for RegressionFit
impl Freeze for RegressionFit
impl Unpin for RegressionFit
impl UnsafeUnpin for RegressionFit
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