Shrinkage

shrinkage::RegularizationPathSolver

Shrinkage for Rust · rust · 0.3.0

pub trait RegularizationPathSolver<Problem>

Generate and fit a family-specific regularization path with one preparation.

Associated types

Error

type Error;

Validation, component, numerical, or backend failure.

Fit

type Fit;

Owned model at each point.

Penalty

type Penalty;

Complete penalty type retained in the result.

Methods

maximum_penalty

fn maximum_penalty(
    &self,
    problem: &Problem
) -> Result<PenaltyMaximum, <Self as RegularizationPathSolver>::Error>

Calculate the true zero-coefficient threshold on the optimization scale.

Errors

Reject undefined null models or invalid components and preserve backend errors.

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem,
    options: &PathOptions
) -> Result<PathFit<<Self as RegularizationPathSolver>::Fit, <Self as RegularizationPathSolver>::Penalty>, <Self as RegularizationPathSolver>::Error>

Generate and fit a path, starting from the optimized null intercepts. Automatic paths may stop early according to PathOptions.

Errors

Reject invalid sequence options or fitting failures without a partial path.

Implementation of RegularizationPathSolver

impl<D, P> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for shrinkage::CoordinateDescent where D: shrinkage::SmoothDatafit + NullModelDatafit, P: PathPenalty

Implementation of RegularizationPathSolver

impl<D, P> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for shrinkage::ProximalGradient<Vec<f64>> where D: SmoothDatafit + NullModelDatafit, P: PathPenalty

Implementation of RegularizationPathSolver

impl<D: shrinkage::PathDatafit, P: PathPenalty, V> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for HybridCoordinateDescent<V>

Implementation of RegularizationPathSolver

impl<M, D, P, V> RegularizationPathSolver<Problem<&M, D, P>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, D: HybridPathDatafit, P: PathPenalty, <P as PathPenalty>::AtStrength: ReducedCoordinatePenalty, V: ProximalVector

Implementation of RegularizationPathSolver

impl<M, D, P, V> RegularizationPathSolver<Problem<&M, D, P>> for shrinkage::ProximalGradient<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, D: SmoothDatafit + NullModelDatafit, P: PathPenalty, V: ProximalVector

Implementation of RegularizationPathSolver

impl<M, D, P> RegularizationPathSolver<Problem<&M, D, P>> for shrinkage::Irls where M: RawColumns<f64> + ColumnStats<f64> + ?Sized, D: QuadraticModelDatafit + NullModelDatafit, P: PathPenalty, <P as PathPenalty>::AtStrength: CoordinatePenalty

Implementation of RegularizationPathSolver

impl<M, P, V> RegularizationPathSolver<Problem<&M, MultivariateGaussian<'_>, AxisPenalty<P>>> for shrinkage::ProximalGradient<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, P: PathPenalty, V: ProximalVector

Implementation of RegularizationPathSolver

impl<M> RegularizationPathSolver<Problem<&M, Gaussian<'_>, L1>> for shrinkage::CoordinateDescent where M: RawColumns<f64> + ColumnStats<f64> + ?Sized

Implementation of RegularizationPathSolver

impl<P: PathPenalty> RegularizationPathSolver<Problem<Box<dyn RuntimeDesign + '_>, MultivariateGaussian<'_>, AxisPenalty<P>>> for shrinkage::ProximalGradient<Vec<f64>>