shrinkage::ClusteredLasso
Shrinkage for Rust · rust · 0.3.0
Source: src/penalty/clustered_lasso.rs
Complete penalty l1 * sum_j |beta[j]| + fusion * sum_{i<j} |beta[i]-beta[j]|.
Both strengths are finite and nonnegative, checked on use. Each unordered pair contributes once. Fusion concerns signed optimization-scale values: opposite signs are distinct even when their magnitudes agree. Intercepts are unpenalized. Empty coefficient vectors are valid.
The exact prox sorts signed values, pools adjacent violations of their rank-shifted values, and soft-thresholds the pooled levels. Value and prox take O(p log p) time and reuse O(p) CPU scratch storage. There is no explicit pairwise graph. crate::ProximalGradient fits this penalty through typed and runtime composition; crate::HybridCoordinateDescent additionally performs exact Gaussian cluster-coordinate sweeps.
use ;
let penalty = new;
assert!;
let mut output = ;
penalty.prox?;
assert_eq!;
Inherent implementation
Source: src/penalty/clustered_lasso.rs
fusion
Source: src/penalty/clustered_lasso.rs
Configured strength of each unordered pair difference.
l1
Source: src/penalty/clustered_lasso.rs
Configured L1 strength.
new
Source: src/penalty/clustered_lasso.rs
Set separate L1 and uniform fusion strengths, checked on use.
Implementation of Clone
Source: src/penalty/clustered_lasso.rs
clone
Source: src/penalty/clustered_lasso.rs
Implementation of Debug
Source: src/penalty/clustered_lasso.rs
fmt
Source: src/penalty/clustered_lasso.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/cluster.rs
labels
Source: src/solver/hybrid/cluster.rs
new
Source: src/solver/hybrid/cluster.rs
rebuild
Source: src/solver/hybrid/cluster.rs
set_screened
Source: src/solver/hybrid/cluster.rs
set_weights
Source: src/solver/hybrid/cluster.rs
sweep_observed
Source: src/solver/hybrid/cluster.rs
Sized> sweep_visits
Source: src/solver/hybrid/cluster.rs
values
Source: src/solver/hybrid/cluster.rs
Implementation of PathPenalty
Source: src/path/penalty.rs
AtStrength
Source: src/path/penalty.rs
type AtStrength = ClusteredLasso;at_strength
Source: src/path/penalty.rs
maximum_penalty
Source: src/path/penalty.rs
Implementation of Penalty
Source: src/penalty/clustered_lasso.rs
Error
Source: src/penalty/clustered_lasso.rs
type Error = FitError;validate_input
Source: src/penalty/clustered_lasso.rs
value
Source: src/penalty/clustered_lasso.rs
Implementation of ProximalPenalty
Source: src/penalty/clustered_lasso.rs
gap_safe
Source: src/penalty/clustered_lasso.rs
prox
Source: src/penalty/clustered_lasso.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
