shrinkage::Scaled
Shrinkage for Rust · rust · 0.3.0
Source: src/penalty/scaled.rs
A complete penalty multiplied by a finite, nonnegative scalar.
Scaled::new(scale, penalty) evaluates scale * penalty.value(coefficients). Parameters are checked during evaluation and fitting. For a positive scale, the exact proximal map delegates to the inner map with step * scale. Zero scaling returns zero value and the identity proximal map, while still checking the wrapped penalty through Penalty::validate_input. The wrapper adds no allocations or coefficient storage.
use ;
let penalty = new;
assert_eq!;
let mut output = ;
penalty.prox?;
assert_eq!;
Scaling a value-only term does not supply a complete proximal map:
use ;
;
let penalty = new;
penalty.prox;
Inherent implementation
Source: src/penalty/scaled.rs
new
Source: src/penalty/scaled.rs
Set the scalar and complete inner penalty, checked when used.
penalty
Source: src/penalty/scaled.rs
Borrow the complete inner penalty, including its own strengths.
scale
Source: src/penalty/scaled.rs
Configured multiplier of the complete penalty.
Implementation of Clone
Source: src/penalty/scaled.rs
clone
Source: src/penalty/scaled.rs
Implementation of Copy
Source: src/penalty/scaled.rs
Implementation of Debug
Source: src/penalty/scaled.rs
fmt
Source: src/penalty/scaled.rs
Implementation of Penalty
Source: src/penalty/scaled.rs
Error
Source: src/penalty/scaled.rs
type Error = FitError;validate_input
Source: src/penalty/scaled.rs
value
Source: src/penalty/scaled.rs
Implementation of ProximalPenalty
Source: src/penalty/scaled.rs
prox
Source: src/penalty/scaled.rs
Implementation of RestrictedProximalPenalty
Source: src/penalty/scaled.rs
prox_restricted
Source: src/penalty/scaled.rs
validate_restricted_input
Source: src/penalty/scaled.rs
value_restricted
Source: src/penalty/scaled.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
