Shrinkage

shrinkage::CrossValidationError

Shrinkage for Rust · rust · 0.3.0

pub enum CrossValidationError<E = std::convert::Infallible>

Validation or fitting failure with the fold and candidate when available.

Errors return no partial cross-validation result. A nonconverged fit is an error, so an incomplete candidate cannot silently influence selection.

Variants

Fold

Fold { fold: usize, source: shrinkage::FitError<E> }

Training, path fitting, or prediction failed in a validation fold.

fold

fold: usize

Zero-based held-out fold identifier.

source

source: shrinkage::FitError<E>

Original validation, backend, or numerical failure.

InvalidInput

InvalidInput { source: shrinkage::FitError<E> }

Invalid configuration, folds, or full response.

source

source: shrinkage::FitError<E>

Underlying validation failure.

NonConverged

NonConverged { fold: Option<usize>, candidate: usize }

A path point did not meet its solver's convergence criterion.

candidate

candidate: usize

Zero-based candidate position in path order.

fold

fold: Option<usize>

Held-out fold, or None for the full-data refit path.

Refit

Refit { source: shrinkage::FitError<E> }

Fitting the full-data path failed after selection.

source

source: shrinkage::FitError<E>

Original fitting failure.

Implementation of Debug

impl<E: core::fmt::Debug> Debug for CrossValidationError<E>

fmt

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

Implementation of Display

impl<E: fmt::Display> Display for CrossValidationError<E>

fmt

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

Implementation of Error

impl<E: Error + 'static> Error for CrossValidationError<E>

source

fn source(&self) -> Option<&(dyn Error + 'static)>

Implementation of From

impl<E> From<FitError<E>> for CrossValidationError<E>

from

fn from(source: FitError<E>) -> Self

Implementation of Freeze

impl<E> Freeze for CrossValidationError<E> where FitError<E>: Freeze + Freeze + Freeze

Implementation of RefUnwindSafe

impl<E> RefUnwindSafe for CrossValidationError<E> where FitError<E>: RefUnwindSafe + RefUnwindSafe + RefUnwindSafe

Implementation of Send

impl<E> Send for CrossValidationError<E> where FitError<E>: Send + Send + Send

Implementation of Sync

impl<E> Sync for CrossValidationError<E> where FitError<E>: Sync + Sync + Sync

Implementation of Unpin

impl<E> Unpin for CrossValidationError<E> where FitError<E>: Unpin + Unpin + Unpin

Implementation of UnsafeUnpin

impl<E> UnsafeUnpin for CrossValidationError<E> where FitError<E>: UnsafeUnpin + UnsafeUnpin + UnsafeUnpin

Implementation of UnwindSafe

impl<E> UnwindSafe for CrossValidationError<E> where FitError<E>: UnwindSafe + UnwindSafe + 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 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 ToString

impl<T> ToString for T where T: Display + ?Sized

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>