shrinkage::Slope
Shrinkage for Rust · rust · 0.3.0
Source: src/penalty/slope.rs
SLOPE penalty sum_j weights[j] * |beta|_(j) on optimization coefficients.
|beta|_(j) denotes the jth largest coefficient magnitude. Supply one finite, nonnegative, nonincreasing weight per coefficient, including the penalty strength. Equal weights give L1; all zero weights give no penalty. An empty weight vector defines the penalty on an empty coefficient vector. Intercepts are excluded by the fitting APIs.
The exact proximal map sorts magnitudes, projects the thresholded values onto nonincreasing, nonnegative sequences by pooling adjacent violations, and restores the original signs and order. Sorting costs O(p log p) and pooling costs O(p). Owned CPU scratch storage is reused across calls. Typed Gaussian problems also support crate::HybridCoordinateDescent, combining full PG transitions with exact signed magnitude-cluster sweeps.
use ;
let penalty = new;
assert_eq!;
let mut output = ;
penalty.prox?;
assert_eq!;
Inherent implementation
Source: src/penalty/slope.rs
new
Source: src/penalty/slope.rs
Set complete rank weights, checked during evaluation and fitting.
weights
Source: src/penalty/slope.rs
Configured rank weights, including the penalty strength.
Implementation of Clone
Source: src/penalty/slope.rs
clone
Source: src/penalty/slope.rs
Implementation of Debug
Source: src/penalty/slope.rs
fmt
Source: src/penalty/slope.rs
Implementation of GapSafePenalty
Source: src/screening/penalty.rs
dual_feasible
Source: src/screening/penalty.rs
dual_scaling
Source: src/screening/penalty.rs
has_sparsity
Source: src/screening/penalty.rs
prox_zeroed
Source: src/screening/penalty.rs
screen_zeros
Source: src/screening/penalty.rs
Implementation of Partition
Source: src/solver/hybrid/slope.rs
labels
Source: src/solver/hybrid/slope.rs
new
Source: src/solver/hybrid/slope.rs
rebuild
Source: src/solver/hybrid/slope.rs
set_screened
Source: src/solver/hybrid/slope.rs
set_weights
Source: src/solver/hybrid/slope.rs
sweep_observed
Source: src/solver/hybrid/slope.rs
Sized> sweep_visits
Source: src/solver/hybrid/slope.rs
values
Source: src/solver/hybrid/slope.rs
Implementation of PathPenalty
Source: src/path/penalty.rs
AtStrength
Source: src/path/penalty.rs
type AtStrength = Slope;at_strength
Source: src/path/penalty.rs
maximum_penalty
Source: src/path/penalty.rs
Implementation of Penalty
Source: src/penalty/slope.rs
Error
Source: src/penalty/slope.rs
type Error = FitError;validate_input
Source: src/penalty/slope.rs
value
Source: src/penalty/slope.rs
Implementation of ProximalPenalty
Source: src/penalty/slope.rs
gap_safe
Source: src/penalty/slope.rs
prox
Source: src/penalty/slope.rs
Implementation of ReducedCoordinatePenalty
Source: src/solver/hybrid.rs
State
Source: src/solver/hybrid.rs
type State = State;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
