Expand description
Shared spine of the robust-rs project: the M-estimator loss trait, robust
scale estimation and the influence-function / efficiency / breakdown-point
theory. Dependency-light (no linear algebra; only libm, num-traits,
thiserror), so it builds for wasm32 and can be depended on for just the
losses and theory. The estimators live in the robust-rs crate.
§Modules
rho: the organizingRhoFunctiontrait (ρ,ψ,weight,ψ',tuning,is_redescending,rho_sup) and its implementations:LeastSquares,L1,Huber,TukeyBiweight,Cauchy,Welsch,Andrews,Hampel.scale: theScaleEstimatortrait and the robust scalesMad,HuberProposal2,SScale,Qn,Sn.theory:influence_function,asymptotic_variance,gaussian_efficiency,breakdown_pointand thegauss_hermitequadrature underneath them.solver: theControlstopping rule shared by the iterative estimators.types: theScale,TuningConstant,RawResidual/ScaledResidualnewtypes.error: the crate-wideRobustError.
use robust_rs_core::rho::{Huber, RhoFunction};
use robust_rs_core::theory::gaussian_efficiency;
let huber = Huber::default(); // k = 1.345
assert_eq!(huber.psi(10.0), 1.345); // clipped score: bounded influence
assert!((gaussian_efficiency(&huber, 128) - 0.95).abs() < 0.01);Modules§
- error
- Error type for the
robust-rs-corecrate. - rho
- The
RhoFunctiontrait: the organizing abstraction of the crate and its standard implementations. - scale
- The
ScaleEstimatortrait and standard robust scale estimates. - solver
- Iterative solver utilities shared across estimators.
- theory
- Sampling-theory computations: influence function, asymptotic variance, Gaussian efficiency and breakdown point.
- types
- Strongly-typed wrappers that make illegal states unrepresentable and prevent conflating a raw residual with a scaled one.