pub struct GeneralisedLogistic;Expand description
Generalised logistic (Richards) curve.
y = amplitude / (1 + exp(shift − rate·x))^(1/shape)Parameters (in order): [amplitude, shift, rate, shape]
One kernel covers two NIST StRD datasets, because the plain logistic is this
form at shape = 1:
- Rat43 is the full four-parameter Richards curve.
- Rat42 is
b1/(1 + exp(b2 − b3·x)): holdshapefixed at 1 and the other three map straight onto NIST’s b1..b3.
Domain guard: shape must be non-zero, and 1 + exp(...) is always > 1 so
the power is well defined for finite arguments. A zero shape returns
f64::NAN rather than an infinity, so the solver backs off instead of
poisoning the residual vector.
Analytic Jacobian (let u = exp(shift − rate·x), s = 1 + u, q = s^(−1/shape)):
- ∂y/∂amplitude = q
- ∂y/∂shift = −amplitude·q·u / (shape·s)
- ∂y/∂rate = amplitude·q·u·x / (shape·s)
- ∂y/∂shape = amplitude·q·ln(s) / shape²
Trait Implementations§
Source§impl Model for GeneralisedLogistic
impl Model for GeneralisedLogistic
Source§fn jacobian_into(&self, x: &[f64], p: &[f64], out: &mut [f64])
fn jacobian_into(&self, x: &[f64], p: &[f64], out: &mut [f64])
Fill a pre-allocated slice with Jacobian values (one entry per parameter). Read more
Source§fn jacobian(&self, x: &[f64], p: &[f64]) -> Vec<f64>
fn jacobian(&self, x: &[f64], p: &[f64]) -> Vec<f64>
Jacobian — one derivative per parameter, in the same order as
param_names(). Read moreSource§fn eval_slice_into(&self, xs: &[f64], params: &[f64], out: &mut [f64])
fn eval_slice_into(&self, xs: &[f64], params: &[f64], out: &mut [f64])
Batch evaluation of a 1-D model: fill
out[i] = eval([xs[i]], params). Read moreAuto Trait Implementations§
impl Freeze for GeneralisedLogistic
impl RefUnwindSafe for GeneralisedLogistic
impl Send for GeneralisedLogistic
impl Sync for GeneralisedLogistic
impl Unpin for GeneralisedLogistic
impl UnsafeUnpin for GeneralisedLogistic
impl UnwindSafe for GeneralisedLogistic
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