pub struct LtsFit {
pub coefficients: Array1<f64>,
pub scale: Scale,
pub residuals: Array1<f64>,
pub subset: Vec<usize>,
pub objective: f64,
pub coverage: usize,
pub breakdown_point: f64,
}Expand description
A fitted Least Trimmed Squares regression.
LTS is a high-breakdown initializer, not an M-estimator, so (unlike
crate::estimator::RegressionFit) it does not implement the ρ-based
crate::estimator::RobustEstimator surface. LTS has a well-defined influence
function and Gaussian efficiency (it is √n-consistent and asymptotically
normal, Rousseeuw & Leroy 1987; Víšek), but these follow from the asymptotics
of the trimmed objective, not from ψ(r)/E[ψ'] and 1/V(ψ) (a hard 0/1
trim has no smooth ψ) so they are not reported here. It exposes coefficients,
the retained h-subset (so the trimming is auditable), a robust residual scale
(MAD) and its coverage-implied breakdown point.
Fields§
§coefficients: Array1<f64>Estimated coefficients.
scale: ScaleRobust residual scale (MAD of the residuals).
residuals: Array1<f64>Residuals y − Xβ̂ for all n observations.
subset: Vec<usize>Retained subset: the indices of the h smallest-residual observations
(ascending).
objective: f64The LTS objective at the fit: Σ of the h smallest squared residuals.
coverage: usizeCoverage h: the number of observations retained.
breakdown_point: f64Breakdown point (n − h + 1)/n.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LtsFit
impl RefUnwindSafe for LtsFit
impl Send for LtsFit
impl Sync for LtsFit
impl Unpin for LtsFit
impl UnsafeUnpin for LtsFit
impl UnwindSafe for LtsFit
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