pub trait RobustLoss: Clone {
// Required methods
fn loss(&self, r: f64) -> f64;
fn weight(&self, r: f64) -> f64;
fn weight_derivative(&self, r: f64) -> f64;
}
Expand description
Trait for robust loss functions
Required Methods§
Sourcefn weight(&self, r: f64) -> f64
fn weight(&self, r: f64) -> f64
Compute the weight (psi function derivative) for a residual Weight = psi(r) / r where psi is the derivative of the loss
Sourcefn weight_derivative(&self, r: f64) -> f64
fn weight_derivative(&self, r: f64) -> f64
Compute the derivative of the weight function (for Hessian computation)
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.