Shrinkage

shrinkage::Problem

Shrinkage for Rust · rust · 0.3.0

pub struct Problem<X, D, P>

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 faer::Mat;
use shrinkage::{CoordinateDescent, Gaussian, L1, Normalization, Problem};

let x = Mat::from_fn(3, 1, |i, _| i as f64);
let y = [1.0, 3.0, 5.0];
let fit = Problem::new(&x, Gaussian::new(&y), L1::new(0.1))
    .normalize(Normalization::Standardize)
    .fit_with(&CoordinateDescent::new())?;
let predictions = fit.predict(&x)?;

Inherent implementation

impl<M, D, P> Problem<&M, D, P> where M: RawColumns<f64> + ColumnStats<f64> + ?Sized

Inherent implementation

impl<M, D, P> shrinkage::Problem<&M, D, P> where M: RowSubset + ?Sized, D: CrossValidationDatafit

cross_validate_path_with

pub fn cross_validate_path_with<S, Q, F>(
    &self,
    solver: &S,
    penalties: Vec<Q>,
    cv: &CrossValidation
) -> Result<CrossValidationFit<F, Q>, CrossValidationError<<M as >::Error>> where Q: Clone, F: ValidationFit, for<'a> S: PathSolver<Self, Q, Fit = F, Error = FitError<<M as >::Error>> + PathSolver<Problem<&'a <M as RowSubset>::Subset, <D as CrossValidationDatafit>::WithResponse<'a>, ()>, Q, Fit = F, Error = FitError<<M as >::Error>>

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

pub fn cross_validate_regularization_path_with<S, F>(
    &self,
    solver: &S,
    options: &PathOptions,
    cv: &CrossValidation
) -> Result<CrossValidationFit<F, <P as PathPenalty>::AtStrength>, CrossValidationError<<M as >::Error>> where P: PathPenalty + Clone, F: ValidationFit, for<'a> S: RegularizationPathSolver<Self, Fit = F, Penalty = <P as PathPenalty>::AtStrength, Error = FitError<<M as >::Error>> + RegularizationPathSolver<Problem<&'a <M as RowSubset>::Subset, <D as CrossValidationDatafit>::WithResponse<'a>, P>, Fit = F, Penalty = <P as PathPenalty>::AtStrength, Error = FitError<<M as >::Error>>

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

impl<M, D, P> Problem<&M, D, P> where M: lazymatrix::MatrixShape + ColumnStats<f64> + ?Sized

Inherent implementation

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

Inherent implementation

impl<X, D, P> Problem<X, D, P>

centers

pub fn centers(&self) -> Option<&[f64]>

Explicit training centers, if supplied.

datafit

pub fn datafit(&self) -> &D

Borrow the predictor datafit.

design

pub fn design(&self) -> &X

Borrow the design component.

fit_from_with_observer

pub fn fit_from_with_observer<S: ObservedSolver<Self>, O: SolverObserver + ?Sized>(
    &self,
    solver: &S,
    initial: shrinkage::InitialPoint<'_>,
    observer: &mut O
) -> Result<<S as Solver>::Fit, <S as Solver>::Error>

Fit from an explicit optimization-scale point while observing updates.

Errors

Forwards fitting errors and rejects invalid initial parameters.

fit_path_with

pub fn fit_path_with<S, Q>(
    &self,
    solver: &S,
    penalties: Vec<Q>
) -> Result<shrinkage::PathFit<<S as PathSolver>::Fit, Q>, <S as PathSolver>::Error> where S: shrinkage::PathSolver<Self, Q>

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

pub fn fit_regularization_path_with<S: shrinkage::RegularizationPathSolver<Self>>(
    &self,
    solver: &S,
    options: &shrinkage::PathOptions
) -> Result<shrinkage::PathFit<<S as RegularizationPathSolver>::Fit, <S as RegularizationPathSolver>::Penalty>, <S as RegularizationPathSolver>::Error>

Generate and fit a regularization sequence with one data preparation.

Errors

Forwards invalid options, undefined null models, and fitting errors.

fit_with

pub fn fit_with<S: Solver<Self>>(
    &self,
    solver: &S
) -> Result<<S as Solver>::Fit, <S as Solver>::Error>

Fit with a solver that supports this composition.

Errors

Forwards validation and numerical failures from the selected solver.

fit_with_observer

pub fn fit_with_observer<S: ObservedSolver<Self>, O: SolverObserver + ?Sized>(
    &self,
    solver: &S,
    observer: &mut O
) -> Result<<S as Solver>::Fit, <S as Solver>::Error>

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

pub fn maximum_penalty_with<S: shrinkage::RegularizationPathSolver<Self>>(
    &self,
    solver: &S
) -> Result<shrinkage::PenaltyMaximum, <S as RegularizationPathSolver>::Error>

Calculate the zero-coefficient threshold on the optimization scale.

Errors

Forwards null-model, component, and backend validation failures.

new

pub fn new(design: X, datafit: D, penalty: P) -> Self

Compose a design, datafit, and penalty.

normalization

pub fn normalization(&self) -> Normalization

Selected training normalization policy.

normalize

pub fn normalize(self, normalization: Normalization) -> Self

Select lazy training-column normalization.

penalty

pub fn penalty(&self) -> &P

Borrow the complete penalty.

scales

pub fn scales(&self) -> Option<&[f64]>

Explicit training scales, if supplied.

with_centers

pub fn with_centers(self, centers: Vec<f64>) -> Self

Supply centers in training-column order, checked when fitting.

with_scales

pub fn with_scales(self, scales: Vec<f64>) -> Self

Supply positive scales in training-column order, checked when fitting.

Implementation of Clone

impl<X: core::clone::Clone, D: core::clone::Clone, P: core::clone::Clone> Clone for Problem<X, D, P>

clone

fn clone(&self) -> Self

Implementation of Debug

impl<X: core::fmt::Debug, D: core::fmt::Debug, P: core::fmt::Debug> Debug for Problem<X, D, P>

fmt

fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result

Implementation of ObservedSolver

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

solve_from_with_observer

fn solve_from_with_observer<O: SolverObserver + ?Sized>(
    &self,
    problem: &Problem<&M, D, P>,
    initial: Option<shrinkage::InitialPoint<'_>>,
    observer: &mut O
) -> Result<<Self as Solver>::Fit, <Self as Solver>::Error>

Implementation of ObservedSolver

impl<M, D, P> ObservedSolver<Problem<&M, D, P>> for Irls where M: RawColumns<f64> + ColumnStats<f64> + ?Sized, D: QuadraticModelDatafit, P: CoordinatePenalty

solve_from_with_observer

fn solve_from_with_observer<O: SolverObserver + ?Sized>(
    &self,
    problem: &Problem<&M, D, P>,
    initial: Option<shrinkage::InitialPoint<'_>>,
    observer: &mut O
) -> Result<IrlsFit, <Self as Solver>::Error>

Implementation of ObservedSolver

impl<M, V, P> ObservedSolver<Problem<&M, Binomial<'_>, P>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector, P: ReducedCoordinatePenalty

solve_from_with_observer

fn solve_from_with_observer<O: SolverObserver + ?Sized>(
    &self,
    problem: &Problem<&M, Binomial<'_>, P>,
    initial: Option<shrinkage::InitialPoint<'_>>,
    observer: &mut O
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of ObservedSolver

impl<M, V> ObservedSolver<Problem<&M, Gaussian<'_>, ChainFusedLasso>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector

solve_from_with_observer

fn solve_from_with_observer<O: SolverObserver + ?Sized>(
    &self,
    problem: &Problem<&M, Gaussian<'_>, ChainFusedLasso>,
    initial: Option<shrinkage::InitialPoint<'_>>,
    observer: &mut O
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of ObservedSolver

impl<M, V> ObservedSolver<Problem<&M, Gaussian<'_>, ClusteredLasso>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector

solve_from_with_observer

fn solve_from_with_observer<O: SolverObserver + ?Sized>(
    &self,
    problem: &Problem<&M, Gaussian<'_>, ClusteredLasso>,
    initial: Option<shrinkage::InitialPoint<'_>>,
    observer: &mut O
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of ObservedSolver

impl<M, V> ObservedSolver<Problem<&M, Gaussian<'_>, Slope>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector

solve_from_with_observer

fn solve_from_with_observer<O: SolverObserver + ?Sized>(
    &self,
    problem: &Problem<&M, Gaussian<'_>, Slope>,
    initial: Option<shrinkage::InitialPoint<'_>>,
    observer: &mut O
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of ObservedSolver

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

Implementation of PathSolver

impl<D, P, Q> PathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>, Q> for shrinkage::CoordinateDescent where D: shrinkage::SmoothDatafit, Q: shrinkage::ProximalPenalty

Implementation of PathSolver

impl<D, P, Q> PathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>, Q> for shrinkage::ProximalGradient<Vec<f64>> where D: SmoothDatafit, Q: ProximalPenalty

Error

type Error = FitError<BackendError>;

Fit

type Fit = ProximalFit;

solve_path

fn solve_path(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, D, P>,
    penalties: Vec<Q>
) -> Result<PathFit<ProximalFit, Q>, <Self as PathSolver>::Error>

Implementation of PathSolver

impl<D: SmoothDatafit, P, Q: shrinkage::ProximalPenalty, V> PathSolver<Problem<Box<dyn RuntimeDesign + '_>, D, P>, Q> for HybridCoordinateDescent<V>

Error

type Error = FitError<BackendError>;

Fit

type Fit = HybridFit;

solve_path

fn solve_path(
    &self,
    _: &Problem<Box<dyn RuntimeDesign + '_>, D, P>,
    _: Vec<Q>
) -> Result<PathFit<HybridFit, Q>, <Self as PathSolver>::Error>

Implementation of PathSolver

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = HybridFit;

solve_path

fn solve_path(
    &self,
    problem: &Problem<&M, D, P>,
    penalties: Vec<Q>
) -> Result<PathFit<HybridFit, Q>, <Self as PathSolver>::Error>

Implementation of PathSolver

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = ProximalFit;

solve_path

fn solve_path(
    &self,
    problem: &Problem<&M, D, P>,
    penalties: Vec<Q>
) -> Result<PathFit<ProximalFit, Q>, <Self as PathSolver>::Error>

Implementation of PathSolver

impl<M, D, P, Q> PathSolver<Problem<&M, D, P>, Q> for shrinkage::Irls where M: RawColumns<f64> + ColumnStats<f64> + ?Sized, D: QuadraticModelDatafit, Q: CoordinatePenalty

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = IrlsFit;

solve_path

fn solve_path(
    &self,
    problem: &Problem<&M, D, P>,
    penalties: Vec<Q>
) -> Result<PathFit<IrlsFit, Q>, <Self as PathSolver>::Error>

Implementation of PathSolver

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

Implementation of PathSolver

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

Implementation of PathSolver

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

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

Error

type Error = FitError<BackendError>;

Fit

type Fit = ProximalFit;

Penalty

type Penalty = <P as PathPenalty>::AtStrength;

maximum_penalty

fn maximum_penalty(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, D, P>
) -> Result<PenaltyMaximum, <Self as RegularizationPathSolver>::Error>

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, D, P>,
    options: &PathOptions
) -> Result<PathFit<ProximalFit, <P as PathPenalty>::AtStrength>, <Self as RegularizationPathSolver>::Error>

Implementation of RegularizationPathSolver

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

Error

type Error = FitError<BackendError>;

Fit

type Fit = HybridFit;

Penalty

type Penalty = <P as PathPenalty>::AtStrength;

maximum_penalty

fn maximum_penalty(
    &self,
    _: &Problem<Box<dyn RuntimeDesign + '_>, D, P>
) -> Result<PenaltyMaximum, <Self as RegularizationPathSolver>::Error>

solve_regularization_path

fn solve_regularization_path(
    &self,
    _: &Problem<Box<dyn RuntimeDesign + '_>, D, P>,
    _: &PathOptions
) -> Result<PathFit<HybridFit, <Self as RegularizationPathSolver>::Penalty>, <Self as RegularizationPathSolver>::Error>

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = HybridFit;

Penalty

type Penalty = <P as PathPenalty>::AtStrength;

maximum_penalty

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

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem<&M, D, P>,
    options: &PathOptions
) -> Result<PathFit<HybridFit, <P as PathPenalty>::AtStrength>, <Self as RegularizationPathSolver>::Error>

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = ProximalFit;

Penalty

type Penalty = <P as PathPenalty>::AtStrength;

maximum_penalty

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

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem<&M, D, P>,
    options: &PathOptions
) -> Result<PathFit<ProximalFit, <P as PathPenalty>::AtStrength>, <Self as RegularizationPathSolver>::Error>

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = IrlsFit;

Penalty

type Penalty = <P as PathPenalty>::AtStrength;

maximum_penalty

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

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem<&M, D, P>,
    options: &PathOptions
) -> Result<PathFit<IrlsFit, <P as PathPenalty>::AtStrength>, <Self as RegularizationPathSolver>::Error>

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = MultivariateFit;

Penalty

type Penalty = AxisPenalty<<P as PathPenalty>::AtStrength>;

maximum_penalty

fn maximum_penalty(
    &self,
    problem: &Problem<&M, MultivariateGaussian<'_>, AxisPenalty<P>>
) -> Result<PenaltyMaximum, <Self as RegularizationPathSolver>::Error>

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem<&M, MultivariateGaussian<'_>, AxisPenalty<P>>,
    options: &PathOptions
) -> Result<PathFit<MultivariateFit, <Self as RegularizationPathSolver>::Penalty>, <Self as RegularizationPathSolver>::Error>

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>>

Error

type Error = FitError<BackendError>;

Fit

type Fit = MultivariateFit;

Penalty

type Penalty = AxisPenalty<<P as PathPenalty>::AtStrength>;

maximum_penalty

fn maximum_penalty(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, MultivariateGaussian<'_>, AxisPenalty<P>>
) -> Result<PenaltyMaximum, <Self as RegularizationPathSolver>::Error>

solve_regularization_path

fn solve_regularization_path(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, MultivariateGaussian<'_>, AxisPenalty<P>>,
    options: &PathOptions
) -> Result<PathFit<MultivariateFit, <Self as RegularizationPathSolver>::Penalty>, <Self as RegularizationPathSolver>::Error>

Implementation of Solver

impl Solver<Problem<Box<dyn RuntimeDesign + '_>, Box<dyn SmoothDatafit<Error = FitError> + '_>, Box<dyn ProximalPenalty<Error = FitError> + '_>>> for shrinkage::CoordinateDescent

Implementation of Solver

impl<D: SmoothDatafit, P: ProximalPenalty> Solver<Problem<Box<dyn RuntimeDesign + '_>, D, P>> for shrinkage::ProximalGradient<Vec<f64>>

Error

type Error = FitError<BackendError>;

Fit

type Fit = ProximalFit;

solve

fn solve(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, D, P>
) -> Result<<Self as Solver>::Fit, <Self as Solver>::Error>

Implementation of Solver

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = ProximalFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, D, P>
) -> Result<<Self as Solver>::Fit, <Self as Solver>::Error>

Implementation of Solver

impl<M, D, P> Solver<Problem<&M, D, P>> for Irls where M: RawColumns<f64> + ColumnStats<f64> + ?Sized, D: QuadraticModelDatafit, P: CoordinatePenalty

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = IrlsFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, D, P>
) -> Result<IrlsFit, <Self as Solver>::Error>

Implementation of Solver

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

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = MultivariateFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, MultivariateGaussian<'_>, AxisPenalty<P>>
) -> Result<<Self as Solver>::Fit, <Self as Solver>::Error>

Implementation of Solver

impl<M, V, P> Solver<Problem<&M, Binomial<'_>, P>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector, P: ReducedCoordinatePenalty

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = HybridFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, Binomial<'_>, P>
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of Solver

impl<M, V> Solver<Problem<&M, Gaussian<'_>, ChainFusedLasso>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = HybridFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, Gaussian<'_>, ChainFusedLasso>
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of Solver

impl<M, V> Solver<Problem<&M, Gaussian<'_>, ClusteredLasso>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = HybridFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, Gaussian<'_>, ClusteredLasso>
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of Solver

impl<M, V> Solver<Problem<&M, Gaussian<'_>, Slope>> for HybridCoordinateDescent<V> where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, V: ProximalVector

Error

type Error = FitError<<M as MatrixErrorType>::Error>;

Fit

type Fit = HybridFit;

solve

fn solve(
    &self,
    problem: &Problem<&M, Gaussian<'_>, Slope>
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of Solver

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

Implementation of Solver

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

Error

type Error = FitError<BackendError>;

Fit

type Fit = MultivariateFit;

solve

fn solve(
    &self,
    problem: &Problem<Box<dyn RuntimeDesign + '_>, MultivariateGaussian<'_>, AxisPenalty<P>>
) -> Result<<Self as Solver>::Fit, <Self as Solver>::Error>

Implementation of Solver

impl<V> Solver<Problem<Box<dyn RuntimeDesign + '_>, Box<dyn SmoothDatafit<Error = FitError> + '_>, Box<dyn ProximalPenalty<Error = FitError> + '_>>> for HybridCoordinateDescent<V>

Error

type Error = FitError<BackendError>;

Fit

type Fit = HybridFit;

solve

fn solve(
    &self,
    _: &RuntimeProblem<'_>
) -> Result<HybridFit, <Self as Solver>::Error>

Implementation of Freeze

impl<X, D, P> Freeze for Problem<X, D, P> where X: Freeze, D: Freeze, P: Freeze

Implementation of RefUnwindSafe

impl<X, D, P> RefUnwindSafe for Problem<X, D, P> where X: RefUnwindSafe, D: RefUnwindSafe, P: RefUnwindSafe

Implementation of Send

impl<X, D, P> Send for Problem<X, D, P> where X: Send, D: Send, P: Send

Implementation of Sync

impl<X, D, P> Sync for Problem<X, D, P> where X: Sync, D: Sync, P: Sync

Implementation of Unpin

impl<X, D, P> Unpin for Problem<X, D, P> where X: Unpin, D: Unpin, P: Unpin

Implementation of UnsafeUnpin

impl<X, D, P> UnsafeUnpin for Problem<X, D, P> where X: UnsafeUnpin, D: UnsafeUnpin, P: UnsafeUnpin

Implementation of UnwindSafe

impl<X, D, P> UnwindSafe for Problem<X, D, P> where X: UnwindSafe, D: UnwindSafe, P: UnwindSafe

Implementation of Any

impl<T> Any for T where T: 'static + ?Sized

Implementation of Borrow

impl<T> Borrow<T> for T where T: ?Sized

Implementation of BorrowMut

impl<T> BorrowMut<T> for T where T: ?Sized

Implementation of ByRef

impl<T> ByRef<T> for T

Implementation of CastableFrom

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT where ST: ?Sized, DT: ?Sized

Implementation of CastableFrom

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT where ST: ?Sized, DT: ?Sized

Implementation of CloneToUninit

impl<T> CloneToUninit for T where T: Clone

Implementation of From

impl<T> From<T> for T

Implementation of Imply

impl<T, U> Imply<T> for U where T: ?Sized, U: ?Sized

Implementation of Into

impl<T, U> Into<U> for T where U: From<T>

Implementation of IntoEither

impl<T> IntoEither for T

Implementation of Pointable

impl<T> Pointable for T

Implementation of Read

impl<T> Read<Exclusive, BecauseExclusive> for T where T: ?Sized

Implementation of Same

impl<T> Same for T

Implementation of SupersetOf

impl<SS, SP> SupersetOf<SS> for SP where SS: SubsetOf<SP>

Implementation of ToOwned

impl<T> ToOwned for T where T: Clone

Implementation of TryFrom

impl<T, U> TryFrom<U> for T where U: Into<T>

Implementation of TryInto

impl<T, U> TryInto<U> for T where U: TryFrom<T>