shrinkage::ProximalGradient
Shrinkage for Rust · rust · 0.3.0
Source: src/solver/proximal.rs
Proximal gradient with backtracking for convex smooth predictor losses and complete convex proximal penalties.
V is the design backend's owned vector: faer::Col<f64>, nalgebra::DVector<f64>, ndarray::Array1<f64>, or Vec<f64> for sprs. No normalized design or Gram matrix is formed. LazyMatrix centers dense products before accumulation. Its generic scaled forward product still clones the input when the backend does not specialize normalization. crate::MultivariateGaussian with crate::AxisPenalty fits joint matrix coefficients and response-specific unpenalized intercepts through the same iteration, returning crate::MultivariateFit.
use ;
use ;
let x = from_fn;
let y = ;
let fit = new
.fit_with?;
let predictions = fit.predict?;
Inherent implementation
Source: src/problem/runtime.rs
solve_runtime_path
Source: src/problem/runtime.rs
Fit runtime-selected penalties in order with one prepared design.
Reuses native products and iteration storage and warms each point from the preceding optimization-scale parameters. The problem's penalty is replaced by the path entries. Steps and iteration budgets reset at each point; iteration-limit fits are retained as warm starts.
Errors
Returns validation or fitting errors without a partial path.
Inherent implementation
Source: src/solver/proximal.rs
initial_step
Source: src/solver/proximal.rs
Set a finite positive initial step, halved until the smooth loss obeys its quadratic upper bound. Accepted steps are retained across iterations.
max_backtracks
Source: src/solver/proximal.rs
Set the maximum number of step halvings for each line search.
max_iterations
Source: src/solver/proximal.rs
Set the maximum number of accepted proximal updates.
new
Source: src/solver/proximal.rs
Use an absolute mapping tolerance of 1e-6, 10,000 iterations, initial step one, and at most 100 step halvings per iteration.
screening
Source: src/solver/proximal.rs
Enable dynamic Gap Safe zero screening when every component supports it.
Enabled by default. Certificates use the original loss and penalty; unsupported compositions retain ordinary proximal-gradient fitting.
solve_path
Source: src/solver/proximal.rs
Fit penalties in the supplied order, preparing the design once.
The problem's penalty is replaced by each path entry. Native product buffers and iteration storage are reused; each point starts from the preceding optimization-scale coefficients and intercept. Each point resets its step and iteration budget. Results own independent parameters and preprocessing. An empty path returns no fits.
Errors
Returns validation, component, line-search, or backend errors without returning a partial path. Iteration-limit results remain in the path and provide the next warm start.
terminate_on
Source: src/solver/proximal.rs
Select a criterion. This solver supports proximal-gradient mapping only.
tolerance
Source: src/solver/proximal.rs
Set the absolute infinity-norm proximal-gradient mapping tolerance.
Implementation of Clone
Source: src/solver/proximal.rs
clone
Source: src/solver/proximal.rs
Implementation of Copy
Source: src/solver/proximal.rs
Implementation of Debug
Source: src/solver/proximal.rs
fmt
Source: src/solver/proximal.rs
Implementation of Default
Source: src/solver/proximal.rs
default
Source: src/solver/proximal.rs
Implementation of ObservedSolver
Source: src/solver/proximal.rs
Implementation of PathSolver
Source: src/path/proximal.rs
Implementation of PathSolver
Source: src/path/proximal.rs
Implementation of PathSolver
Source: src/solver/proximal/multivariate.rs
Implementation of PathSolver
Source: src/solver/proximal/multivariate.rs
Implementation of RegularizationPathSolver
Source: src/path/proximal.rs
Implementation of RegularizationPathSolver
Source: src/path/proximal.rs
Implementation of RegularizationPathSolver
Source: src/solver/proximal/multivariate.rs
Implementation of RegularizationPathSolver
Source: src/solver/proximal/multivariate.rs
Implementation of Solver
Source: src/problem/runtime.rs
Implementation of Solver
Source: src/solver/proximal.rs
Implementation of Solver
Source: src/solver/proximal/multivariate.rs
Implementation of Solver
Source: src/solver/proximal/multivariate.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
