Shrinkage

shrinkage::PathFit

Shrinkage for Rust · rust · 0.3.0

pub struct PathFit<F, P>

Owned fits and their penalty settings in the order they were fitted.

Parameters and diagnostics belong to each fit. Automatic paths additionally retain scalar strengths and distinguish their starting anchor from a true zero-coefficient threshold. Arbitrary explicit paths have no inferred scalar tuning parameter; inspect their complete penalty settings instead.

Inherent implementation

impl<F, P> PathFit<F, P>

deviances

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

Averaged original-loss deviances, aligned with the fitted automatic points. Unavailable for explicit paths and losses without deviance support.

fits

pub fn fits(&self) -> &[F]

Fitted models, including finite results that reached their iteration limit.

into_parts

pub fn into_parts(self) -> (Vec<F>, Vec<P>)

Consume the result and recover its fits and complete penalty settings.

is_empty

pub fn is_empty(&self) -> bool

Whether the path contains no points.

iter

pub fn iter(&self) -> impl ExactSizeIterator<Item = (&P, &F)>

Iterate over corresponding penalty settings and fits.

lambda_start

pub fn lambda_start(&self) -> Option<f64>

Starting anchor used for an automatic path, including a caller override.

lambdas

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

Scalar strengths for generated paths and explicit lasso lambda paths.

len

pub fn len(&self) -> usize

Number of fitted points.

maximum_penalty

pub fn maximum_penalty(&self) -> Option<PenaltyMaximum>

True zero-coefficient threshold, calculated for automatic paths.

null_deviance

pub fn null_deviance(&self) -> Option<f64>

Averaged deviance of the automatic path's optimized zero-coefficient model. Unavailable for explicit paths and losses without deviance support.

penalties

pub fn penalties(&self) -> &[P]

Complete penalty settings for each fitted point.

termination

pub fn termination(&self) -> PathTermination

Path completion or early stopping, independent of per-model convergence.

Implementation of Clone

impl<F: core::clone::Clone, P: core::clone::Clone> Clone for PathFit<F, P>

clone

fn clone(&self) -> Self

Implementation of Debug

impl<F: core::fmt::Debug, P: core::fmt::Debug> Debug for PathFit<F, P>

fmt

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

Implementation of Freeze

impl<F, P> Freeze for PathFit<F, P> where Vec<F>: Freeze, Vec<P>: Freeze

Implementation of RefUnwindSafe

impl<F, P> RefUnwindSafe for PathFit<F, P> where Vec<F>: RefUnwindSafe, Vec<P>: RefUnwindSafe

Implementation of Send

impl<F, P> Send for PathFit<F, P> where Vec<F>: Send, Vec<P>: Send

Implementation of Sync

impl<F, P> Sync for PathFit<F, P> where Vec<F>: Sync, Vec<P>: Sync

Implementation of Unpin

impl<F, P> Unpin for PathFit<F, P> where Vec<F>: Unpin, Vec<P>: Unpin

Implementation of UnsafeUnpin

impl<F, P> UnsafeUnpin for PathFit<F, P> where Vec<F>: UnsafeUnpin, Vec<P>: UnsafeUnpin

Implementation of UnwindSafe

impl<F, P> UnwindSafe for PathFit<F, P> where Vec<F>: UnwindSafe, Vec<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>