pub struct WorkingModelPirlsOptions {
pub max_iterations: usize,
pub convergence_tolerance: f64,
pub adaptive_kkt_tolerance: Option<AdaptiveKktTolerance>,
pub max_step_halving: usize,
pub min_step_size: f64,
pub firth_bias_reduction: bool,
pub coefficient_lower_bounds: Option<Array1<f64>>,
pub linear_constraints: Option<LinearInequalityConstraints>,
pub initial_lm_lambda: Option<f64>,
pub geodesic_acceleration: bool,
pub arrow_schur: Option<ArrowSchurInnerConfig>,
}Fields§
§max_iterations: usize§convergence_tolerance: f64§adaptive_kkt_tolerance: Option<AdaptiveKktTolerance>§max_step_halving: usize§min_step_size: f64§firth_bias_reduction: bool§coefficient_lower_bounds: Option<Array1<f64>>Optional lower bounds on coefficients (same coordinate system as beta).
Use -inf for unconstrained entries.
linear_constraints: Option<LinearInequalityConstraints>Optional linear inequality constraints in current coefficient coordinates: A * beta >= b.
initial_lm_lambda: Option<f64>Optional warm-start hint for the Levenberg-Marquardt damping
coefficient. When set, the inner solver seeds λ_LM to this
value instead of the default 1e-6. Clamped on consumption to
[1e-6, 1e-3] so a stale or pathological hint cannot poison the
solve: the upper bound costs at most three damping halvings
versus the cold default, which is dwarfed by the savings when
the hint is informative.
Used by execute_pirls_if_needed (in solver::reml::outer_eval)
to persist the converged λ across consecutive PIRLS calls in a
single REML outer optimization, so the inner Newton does not
have to rediscover problem-specific damping at every accepted
outer iterate.
geodesic_acceleration: boolEnable the Transtrum-Sethna geodesic-acceleration second-order
correction on each accepted Levenberg-Marquardt step. When true,
after the standard LM direction δp = −(H + λ_lm·diag(H))⁻¹ g
is computed and accepted by the LM gain test, the solver computes
a finite-difference estimate of the directional second derivative
of the gradient along δp, solves a second linear system with
the same (already-factored) Hessian, and adds the correction
δp₂ to the step only if ‖δp₂‖ ≤ α‖δp‖ (the Transtrum-Sethna
2011 acceptance criterion, α = 0.75 here). The correction costs
two extra full WorkingModel::update calls per accepted step
(for the FD evaluations); it is most useful for fits whose
penalized Hessian is near-singular (latent-coordinate fits,
near-collinear bases). Default false; opt-in until validated
across the broader family of likelihoods and penalties.
arrow_schur: Option<ArrowSchurInnerConfig>Optional arrow-Schur structured-inner-solve descriptor.
When Some, every accepted LM Newton step inside the inner loop
is computed by the per-observation arrow-Schur path
(crate::arrow_schur::ArrowSchurSystem) instead of the
β-only solve_newton_direction_dense. When None, the existing
β-only path is used unchanged (back-compat: every existing call
site that does not opt in is unaffected).
Scope note. This wires the inner Gauss–Newton step. The REML
outer-loop gradient w.r.t. t (which carries a shared Schur⁻¹
factor) is a separate plumbing change owned by the REML driver and is
not handled here.
Trait Implementations§
Source§impl Clone for WorkingModelPirlsOptions
impl Clone for WorkingModelPirlsOptions
Source§fn clone(&self) -> WorkingModelPirlsOptions
fn clone(&self) -> WorkingModelPirlsOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WorkingModelPirlsOptions
impl !UnwindSafe for WorkingModelPirlsOptions
impl Freeze for WorkingModelPirlsOptions
impl Send for WorkingModelPirlsOptions
impl Sync for WorkingModelPirlsOptions
impl Unpin for WorkingModelPirlsOptions
impl UnsafeUnpin for WorkingModelPirlsOptions
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,
impl<T, U> Imply<T> for U
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.