shrinkage::Problem
Shrinkage for Rust · rust · 0.3.0
Source: src/problem.rs
A typed design, datafit, and penalty with training normalization settings.
CoordinateDescent supports a borrowed RawColumns design with Gaussian and L1, returning LassoFit. crate::ProximalGradient uses native forward and transposed products with crate::SmoothDatafit and a complete crate::ProximalPenalty, returning crate::ProximalFit. Both results retain original-scale parameters and training normalization. crate::Irls uses column access with crate::DiagonalHessianDatafit and crate::CoordinatePenalty, returning crate::IrlsFit with full KKT checks. crate::HybridCoordinateDescent fits Gaussian crate::ClusteredLasso, crate::ChainFusedLasso, and crate::Slope with dense aggregates, returning crate::HybridFit with full PG mapping checks. crate::MultivariateGaussian with crate::AxisPenalty uses the same proximal iteration and returns crate::MultivariateFit. Its coefficient feature and response dimensions and penalty axis are explicit.
use Mat;
use ;
let x = from_fn;
let y = ;
let fit = new
.normalize
.fit_with?;
let predictions = fit.predict?;
Inherent implementation
Source: src/problem.rs
Inherent implementation
Source: src/cross_validation.rs
cross_validate_path_with
Source: src/cross_validation.rs
Cross-validate an explicit sequence, reusing a path workspace per fold.
Candidates are cloned unchanged into each fold. Order them from most to least preferred for simplicity to define ties and one-standard-error selection, including penalties with independent strengths or profiles. A full-data path is fitted after selection and retained in the result.
Errors
Reject invalid folds, metrics, supplied centers or scales, degenerate binomial training folds, empty paths, and any failed or nonconverged fit.
cross_validate_regularization_path_with
Source: src/cross_validation.rs
Cross-validate automatic paths aligned by relative training-fold strength.
Each fold computes normalization, null gradients, and its anchor only on its training rows. Candidates share log-spaced fractions of that anchor. The dimension-dependent endpoint ratio is resolved once using the smallest training fold. Early stopping is disabled to score every point. lambda_start, when supplied, is a fixed external anchor for every fold. The full-data path uses its own anchor after validation selects a fraction.
Errors
Return fold-specific failures, undefined anchors, invalid settings, or any nonconverged path point. Supplied preprocessing vectors are rejected.
Inherent implementation
Source: src/problem.rs
Inherent implementation
Source: src/problem.rs
Inherent implementation
Source: src/problem.rs
centers
Source: src/problem.rs
Explicit training centers, if supplied.
datafit
Source: src/problem.rs
Borrow the predictor datafit.
design
Source: src/problem.rs
Borrow the design component.
fit_from_with_observer
Source: src/problem.rs
Sized> Fit from an explicit optimization-scale point while observing updates.
Errors
Forwards fitting errors and rejects invalid initial parameters.
fit_path_with
Source: src/problem.rs
Fit an owned explicit penalty sequence in caller order.
Errors
Forwards fitting errors without a partial path. Iteration-limit fits remain available and initialize the next point.
fit_regularization_path_with
Source: src/problem.rs
Generate and fit a regularization sequence with one data preparation.
Errors
Forwards invalid options, undefined null models, and fitting errors.
fit_with
Source: src/problem.rs
Fit with a solver that supports this composition.
Errors
Forwards validation and numerical failures from the selected solver.
fit_with_observer
Source: src/problem.rs
Sized> Fit a supported typed problem while observing accepted optimization states.
Observations use optimization-scale parameters, before back-transformation.
Errors
Returns the same validation, numerical, and backend errors as fitting.
maximum_penalty_with
Source: src/problem.rs
Calculate the zero-coefficient threshold on the optimization scale.
Errors
Forwards null-model, component, and backend validation failures.
new
Source: src/problem.rs
Compose a design, datafit, and penalty.
normalization
Source: src/problem.rs
Selected training normalization policy.
normalize
Source: src/problem.rs
Select lazy training-column normalization.
penalty
Source: src/problem.rs
Borrow the complete penalty.
scales
Source: src/problem.rs
Explicit training scales, if supplied.
with_centers
Source: src/problem.rs
Supply centers in training-column order, checked when fitting.
with_scales
Source: src/problem.rs
Supply positive scales in training-column order, checked when fitting.
Implementation of Clone
Source: src/problem.rs
clone
Source: src/problem.rs
Implementation of Debug
Source: src/problem.rs
fmt
Source: src/problem.rs
Implementation of ObservedSolver
Source: src/solver/proximal.rs
solve_from_with_observer
Source: src/solver/proximal.rs
Sized> Implementation of ObservedSolver
Source: src/solver/irls.rs
solve_from_with_observer
Source: src/solver/irls.rs
Sized> Implementation of ObservedSolver
Source: src/solver/hybrid/irls.rs
solve_from_with_observer
Source: src/solver/hybrid/irls.rs
Sized> Implementation of ObservedSolver
Source: src/solver/hybrid.rs
solve_from_with_observer
Source: src/solver/hybrid.rs
Sized> Implementation of ObservedSolver
Source: src/solver/hybrid.rs
solve_from_with_observer
Source: src/solver/hybrid.rs
Sized> Implementation of ObservedSolver
Source: src/solver/hybrid.rs
solve_from_with_observer
Source: src/solver/hybrid.rs
Sized> Implementation of ObservedSolver
Source: src/problem.rs
Implementation of PathSolver
Source: src/path/coordinate.rs
Implementation of PathSolver
Source: src/path/proximal.rs
Error
Source: src/path/proximal.rs
type Error = ;Fit
Source: src/path/proximal.rs
type Fit = ProximalFit;solve_path
Source: src/path/proximal.rs
Implementation of PathSolver
Source: src/solver/hybrid/path.rs
Error
Source: src/solver/hybrid/path.rs
type Error = ;Fit
Source: src/solver/hybrid/path.rs
type Fit = HybridFit;solve_path
Source: src/solver/hybrid/path.rs
Implementation of PathSolver
Source: src/solver/hybrid/path.rs
Error
Source: src/solver/hybrid/path.rs
type Error = ;Fit
Source: src/solver/hybrid/path.rs
type Fit = HybridFit;solve_path
Source: src/solver/hybrid/path.rs
Implementation of PathSolver
Source: src/path/proximal.rs
Error
Source: src/path/proximal.rs
type Error = ;Fit
Source: src/path/proximal.rs
type Fit = ProximalFit;solve_path
Source: src/path/proximal.rs
Implementation of PathSolver
Source: src/path/irls.rs
Error
Source: src/path/irls.rs
type Error = ;Fit
Source: src/path/irls.rs
type Fit = IrlsFit;solve_path
Source: src/path/irls.rs
Implementation of PathSolver
Source: src/solver/proximal/multivariate.rs
Implementation of PathSolver
Source: src/path/coordinate.rs
Implementation of PathSolver
Source: src/solver/proximal/multivariate.rs
Implementation of RegularizationPathSolver
Source: src/path/coordinate.rs
Implementation of RegularizationPathSolver
Source: src/path/proximal.rs
Error
Source: src/path/proximal.rs
type Error = ;Fit
Source: src/path/proximal.rs
type Fit = ProximalFit;Penalty
Source: src/path/proximal.rs
type Penalty = AtStrength;maximum_penalty
Source: src/path/proximal.rs
solve_regularization_path
Source: src/path/proximal.rs
Implementation of RegularizationPathSolver
Source: src/solver/hybrid/path.rs
Error
Source: src/solver/hybrid/path.rs
type Error = ;Fit
Source: src/solver/hybrid/path.rs
type Fit = HybridFit;Penalty
Source: src/solver/hybrid/path.rs
type Penalty = AtStrength;maximum_penalty
Source: src/solver/hybrid/path.rs
solve_regularization_path
Source: src/solver/hybrid/path.rs
Implementation of RegularizationPathSolver
Source: src/solver/hybrid/path.rs
Error
Source: src/solver/hybrid/path.rs
type Error = ;Fit
Source: src/solver/hybrid/path.rs
type Fit = HybridFit;Penalty
Source: src/solver/hybrid/path.rs
type Penalty = AtStrength;maximum_penalty
Source: src/solver/hybrid/path.rs
solve_regularization_path
Source: src/solver/hybrid/path.rs
Implementation of RegularizationPathSolver
Source: src/path/proximal.rs
Error
Source: src/path/proximal.rs
type Error = ;Fit
Source: src/path/proximal.rs
type Fit = ProximalFit;Penalty
Source: src/path/proximal.rs
type Penalty = AtStrength;maximum_penalty
Source: src/path/proximal.rs
solve_regularization_path
Source: src/path/proximal.rs
Implementation of RegularizationPathSolver
Source: src/path/irls.rs
Error
Source: src/path/irls.rs
type Error = ;Fit
Source: src/path/irls.rs
type Fit = IrlsFit;Penalty
Source: src/path/irls.rs
type Penalty = AtStrength;maximum_penalty
Source: src/path/irls.rs
solve_regularization_path
Source: src/path/irls.rs
Implementation of RegularizationPathSolver
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;Penalty
Source: src/solver/proximal/multivariate.rs
type Penalty = ;maximum_penalty
Source: src/solver/proximal/multivariate.rs
solve_regularization_path
Source: src/solver/proximal/multivariate.rs
Implementation of RegularizationPathSolver
Source: src/path/coordinate.rs
Implementation of RegularizationPathSolver
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;Penalty
Source: src/solver/proximal/multivariate.rs
type Penalty = ;maximum_penalty
Source: src/solver/proximal/multivariate.rs
solve_regularization_path
Source: src/solver/proximal/multivariate.rs
Implementation of Solver
Source: src/problem/runtime.rs
Implementation of Solver
Source: src/problem/runtime.rs
Error
Source: src/problem/runtime.rs
type Error = ;Fit
Source: src/problem/runtime.rs
type Fit = ProximalFit;solve
Source: src/problem/runtime.rs
Implementation of Solver
Source: src/solver/proximal.rs
Error
Source: src/solver/proximal.rs
type Error = ;Fit
Source: src/solver/proximal.rs
type Fit = ProximalFit;solve
Source: src/solver/proximal.rs
Implementation of Solver
Source: src/solver/irls.rs
Error
Source: src/solver/irls.rs
type Error = ;Fit
Source: src/solver/irls.rs
type Fit = IrlsFit;solve
Source: src/solver/irls.rs
Implementation of Solver
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
Source: src/solver/proximal/multivariate.rs
Implementation of Solver
Source: src/solver/hybrid/irls.rs
Error
Source: src/solver/hybrid/irls.rs
type Error = ;Fit
Source: src/solver/hybrid/irls.rs
type Fit = HybridFit;solve
Source: src/solver/hybrid/irls.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Error
Source: src/solver/hybrid.rs
type Error = ;Fit
Source: src/solver/hybrid.rs
type Fit = HybridFit;solve
Source: src/solver/hybrid.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Error
Source: src/solver/hybrid.rs
type Error = ;Fit
Source: src/solver/hybrid.rs
type Fit = HybridFit;solve
Source: src/solver/hybrid.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Error
Source: src/solver/hybrid.rs
type Error = ;Fit
Source: src/solver/hybrid.rs
type Fit = HybridFit;solve
Source: src/solver/hybrid.rs
Implementation of Solver
Source: src/problem.rs
Implementation of Solver
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
Source: src/solver/proximal/multivariate.rs
Implementation of Solver
Source: src/solver/hybrid.rs
Error
Source: src/solver/hybrid.rs
type Error = ;Fit
Source: src/solver/hybrid.rs
type Fit = HybridFit;solve
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
