shrinkage::AxisPenalty
Shrinkage for Rust · rust · 0.3.0
Source: src/penalty/axis.rs
A complete vector penalty applied along an explicit coefficient axis.
Features separates responses; Responses can couple their coefficients at each feature. All can couple the full matrix. Each group uses the supplied strength without dividing by the group or response count. The prox is exact because the groups are disjoint. Intercepts are never included. Strided response groups use owned reusable CPU scratch buffers.
Compose crate::Scaled and crate::Masked inside the axis penalty. With Responses, each feature row receives the same vector penalty and a mask has one entry per response. With Features, a mask has one entry per feature and excludes those feature rows across all responses. Masks require an inner crate::RestrictedProximalPenalty.
use ;
let layout = new?;
let penalty = new;
// Each response's feature vector is contiguous, so the rows are [1, 4],
// [2, 5], and [3, 6]. Only the second response is penalized in each row.
let input = ;
assert!;
let mut output = ;
penalty.prox?;
assert_eq!;
Inherent implementation
Source: src/penalty/axis.rs
axis
Source: src/penalty/axis.rs
Axis along which the complete vector penalty applies.
layout
Source: src/penalty/axis.rs
Feature and response dimensions on which this penalty is defined.
new
Source: src/penalty/axis.rs
Apply a vector penalty to the selected axis of the given layout.
penalty
Source: src/penalty/axis.rs
Borrow the complete vector penalty applied to each group.
Implementation of Clone
Source: src/penalty/axis.rs
clone
Source: src/penalty/axis.rs
Implementation of Debug
Source: src/penalty/axis.rs
fmt
Source: src/penalty/axis.rs
Implementation of PathPenalty
Source: src/path/penalty.rs
AtStrength
Source: src/path/penalty.rs
type AtStrength = ;at_strength
Source: src/path/penalty.rs
maximum_penalty
Source: src/path/penalty.rs
path_anchor
Source: src/path/penalty.rs
Implementation of PathSolver
Source: src/solver/proximal/multivariate.rs
Error
Source: src/solver/proximal/multivariate.rs
type Error = ;Fit
Source: src/solver/proximal/multivariate.rs
type Fit = MultivariateFit;solve_path
Source: src/solver/proximal/multivariate.rs
Implementation of PathSolver
Source: src/solver/proximal/multivariate.rs
Error
Source: src/solver/proximal/multivariate.rs
type Error = ;Fit
Source: src/solver/proximal/multivariate.rs
type Fit = MultivariateFit;solve_path
Source: src/solver/proximal/multivariate.rs
Implementation of Penalty
Source: src/penalty/axis.rs
Error
Source: src/penalty/axis.rs
type Error = FitError;validate_input
Source: src/penalty/axis.rs
value
Source: src/penalty/axis.rs
Implementation of ProximalPenalty
Source: src/penalty/axis.rs
prox
Source: src/penalty/axis.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
