Skip to main content

Crate robust_rs_core

Crate robust_rs_core 

Source
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

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-core crate.
rho
The RhoFunction trait: the organizing abstraction of the crate and its standard implementations.
scale
The ScaleEstimator trait 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.