Shrinkage

shrinkage::PathOptions

Shrinkage for Rust · rust · 0.3.0

pub struct PathOptions

Options for a decreasing, log-spaced automatic regularization sequence.

Defaults to 100 points and an endpoint ratio of 0.01 when observations are fewer than features, or 0.0001 otherwise. Automatic paths stop early on deviance by default, after at least five points. Disable early stopping to fit the entire sequence. Losses without deviance support fit every point. Options are checked when fitting. A zero start generates zero strengths.

Inherent implementation

impl PathOptions

deviance_change_tolerance

pub fn deviance_change_tolerance(self, tolerance: f64) -> Self

Stop below this fractional decrease in consecutive deviances (1e-5). Zero disables this criterion. Only converged, nonincreasing fits qualify.

deviance_ratio_tolerance

pub fn deviance_ratio_tolerance(self, tolerance: f64) -> Self

Stop at this explained fraction of null deviance; defaults to 0.999.

early_stopping

pub fn early_stopping(self, enabled: bool) -> Self

Enable deviance-based early stopping for automatic paths (the default).

lambda_min_ratio

pub fn lambda_min_ratio(self, ratio: f64) -> Self

Set the finite endpoint ratio in (0, 1].

lambda_start

pub fn lambda_start(self, value: f64) -> Self

Override the starting value with a finite, nonnegative strength. The result still records the independently calculated true threshold.

min_points

pub fn min_points(self, count: usize) -> Self

Require this many fitted points before early stopping; defaults to five. Shorter requested sequences are fitted completely.

new

pub fn new() -> Self

Use the default sequence length and dimension-dependent endpoint ratio.

nlambda

pub fn nlambda(self, count: usize) -> Self

Set a strictly positive number of points; one returns the starting value.

Implementation of Clone

impl Clone for PathOptions

clone

fn clone(&self) -> Self

Implementation of Copy

impl Copy for PathOptions

Implementation of Debug

impl Debug for PathOptions

fmt

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

Implementation of Default

impl Default for PathOptions

default

fn default() -> Self

Implementation of Freeze

impl Freeze for PathOptions

Implementation of RefUnwindSafe

impl RefUnwindSafe for PathOptions

Implementation of Send

impl Send for PathOptions

Implementation of Sync

impl Sync for PathOptions

Implementation of Unpin

impl Unpin for PathOptions

Implementation of UnsafeUnpin

impl UnsafeUnpin for PathOptions

Implementation of UnwindSafe

impl UnwindSafe for PathOptions

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>