shrinkage::Irls
Shrinkage for Rust · rust · 0.3.0
Source: src/solver/irls.rs
Iteratively reweighted least squares with coordinate-descent inner solves.
Fits differentiable losses with nonnegative diagonal working curvature and separable convex penalties. For nonconvex losses, KKT checks certify stationarity rather than global optimality. Backtracking evaluates the original penalized objective. The quadratic model floors predictor curvature at 1e-12 / nobs, leaving the original loss, gradient, and convergence check unchanged. Working sets use restricted checks between complete KKT checks. No safe screening or dual certificate is provided.
Solver workspace is O(nobs + nfeatures). Weighted column norms use LazyMatrix's O(nobs + nnz) operation once per column per outer iteration. Noncanonical sparse columns can require temporary O(nobs) scratch there.
use Mat;
use ;
let x = from_fn;
let y = ;
let fit = new
.fit_with?;
let logits = fit.predict?;
Inherent implementation
Source: src/solver/irls.rs
max_backtracks
Source: src/solver/irls.rs
Set the maximum number of halvings after the initial full-step trial.
max_inner_iterations
Source: src/solver/irls.rs
Set the strictly positive sweep limit for each quadratic model. An inexact inner solve may still supply an accepted descent direction.
max_iterations
Source: src/solver/irls.rs
Set the strictly positive maximum number of accepted outer steps.
new
Source: src/solver/irls.rs
Use KKT tolerance 1e-6, 100 outer iterations, 1,000 inner sweeps per outer iteration, at most 100 step halvings, and working sets.
terminate_on
Source: src/solver/irls.rs
Select a stopping rule. Only absolute KKT violation is supported.
tolerance
Source: src/solver/irls.rs
Set the finite, strictly positive absolute KKT tolerance.
working_set_policy
Source: src/solver/irls.rs
Select the working-set policy. The last working-set setter wins.
working_sets
Source: src/solver/irls.rs
Enable automatic working sets, or disable heuristic restrictions. The last working-set setter wins.
Implementation of Clone
Source: src/solver/irls.rs
clone
Source: src/solver/irls.rs
Implementation of Copy
Source: src/solver/irls.rs
Implementation of Debug
Source: src/solver/irls.rs
fmt
Source: src/solver/irls.rs
Implementation of Default
Source: src/solver/irls.rs
default
Source: src/solver/irls.rs
Implementation of ObservedSolver
Source: src/solver/irls.rs
Implementation of PathSolver
Source: src/path/irls.rs
Implementation of RegularizationPathSolver
Source: src/path/irls.rs
Implementation of Solver
Source: src/solver/irls.rs
Implementation of Freeze
Implementation of RefUnwindSafe
Implementation of Send
Implementation of Sync
Implementation of Unpin
Implementation of UnsafeUnpin
Implementation of UnwindSafe
Implementation of Any
Implementation of Borrow
Implementation of BorrowMut
Implementation of ByRef
Implementation of CastableFrom
Implementation of CastableFrom
Implementation of CloneToUninit
Implementation of From
Implementation of Imply
Implementation of Into
Implementation of IntoEither
Implementation of Pointable
Implementation of Read
Implementation of Same
Implementation of SupersetOf
Implementation of ToOwned
Implementation of TryFrom
Implementation of TryInto
