shrinkage::HybridCoordinateDescent
Shrinkage for Rust · rust · 0.3.0
Source: src/solver/hybrid.rs
Coordinate descent with periodic proximal-gradient steps for clustered lasso, chain fused lasso, and SLOPE with Gaussian or logistic loss.
Begin with a PG transition on the working set, then alternate five cluster sweeps with one PG transition. PG can split zero and nonzero blocks; CD moves entire exact-equality blocks and merges exact ties. Only a fresh full-space PG mapping, including the intercept derivative, certifies convergence. Diagnostic calls never advance or alter the iteration. Chain blocks are contiguous segments, with zero-weight edges kept as cuts. SLOPE blocks group exact magnitudes while retaining individual signs. Its zero block stays fixed during sweeps and can reactivate through full PG. Binomial problems use IRLS with weighted hybrid inner solves and Armijo backtracking on the original objective. Only the original-loss mapping certifies logistic convergence. Predictions remain linear predictors. Dynamic Gap Safe zero screening is enabled by default. Restrictions retain the complete original penalty, and certificates always use the original loss. Working sets are independently enabled through Self::working_set_policy. Disable both restrictions for complete matrix sweeps.
V is the backend's native vector, as for crate::ProximalGradient. Aggregates use dense storage: O(n * K + p + n) for K clusters, retaining buffers at their high-water capacities. Staging a PG rebuild retains both old and candidate aggregates. No normalized design or Gram is formed.
use ;
use ;
let x = from_fn;
let fit = new
.fit_with?;
let predictions = fit.predict?;
Inherent implementation
Source: src/solver/hybrid.rs
check_every
Source: src/solver/hybrid.rs
Check every positive number of iterations, also initially and at budget.
cluster_sweeps
Source: src/solver/hybrid.rs
Set the positive number of complete sweeps between PG transitions.
max_inner_iterations
Source: src/solver/hybrid.rs
Limit PG transitions plus sweeps per logistic quadratic model (default 1,000). Inexact models can still provide accepted descent directions. Gaussian fits ignore this limit. The total max_iterations also applies.
max_iterations
Source: src/solver/hybrid.rs
Limit the total number of committed PG transitions and complete sweeps. Logistic fits share this budget across all quadratic subproblems.
max_outer_backtracks
Source: src/solver/hybrid.rs
Limit logistic step halvings after the full trial (default 100). This differs from curvature backtracking in HybridStep.
max_outer_iterations
Source: src/solver/hybrid.rs
Limit accepted logistic IRLS steps (default 100). Gaussian fits ignore it.
new
Source: src/solver/hybrid.rs
Use mapping tolerance 1e-6, 10,000 iterations, five sweeps per PG, checks every ten iterations, backtracking, and safe zero screening. Logistic fits allow 100 outer steps, 1,000 inner iterations per model, and 100 step halvings.
screening
Source: src/solver/hybrid.rs
Enable dynamic Gap Safe zero screening, enabled by default. Certificates and stopping checks use the original loss and full design. Logistic quadratic models retain restrictions certified at outer iterates.
step_policy
Source: src/solver/hybrid.rs
Select backtracking or a computed fixed curvature upper bound.
terminate_on
Source: src/solver/hybrid.rs
Select a stopping rule. Only absolute PG mapping is supported.
tolerance
Source: src/solver/hybrid.rs
Set the absolute infinity-norm full PG mapping tolerance.
working_set_policy
Source: src/solver/hybrid.rs
Select the working-set policy. The last working-set setter wins.
working_sets
Source: src/solver/hybrid.rs
Enable automatic working sets, or disable heuristic restrictions.
Implementation of Clone
Source: src/solver/hybrid.rs
clone
Source: src/solver/hybrid.rs
Implementation of Copy
Source: src/solver/hybrid.rs
Implementation of Debug
Source: src/solver/hybrid.rs
fmt
Source: src/solver/hybrid.rs
Implementation of Default
Source: src/solver/hybrid.rs
default
Source: src/solver/hybrid.rs
Implementation of ObservedSolver
Source: src/solver/hybrid/irls.rs
Implementation of ObservedSolver
Source: src/solver/hybrid.rs
Implementation of ObservedSolver
Source: src/solver/hybrid.rs
Implementation of ObservedSolver
Source: src/solver/hybrid.rs
Implementation of PathSolver
Source: src/solver/hybrid/path.rs
Implementation of PathSolver
Source: src/solver/hybrid/path.rs
Implementation of RegularizationPathSolver
Source: src/solver/hybrid/path.rs
Implementation of RegularizationPathSolver
Source: src/solver/hybrid/path.rs
Implementation of Solver
Source: src/solver/hybrid/irls.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Implementation of Solver
Source: src/solver/hybrid.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
