Shrinkage

shrinkage::MultivariateFit

Shrinkage for Rust · rust · 0.3.0

pub struct MultivariateFit

Original-scale feature-by-response coefficients and one intercept per response.

Coefficients use CoefficientLayout's response-major storage. The objective and stopping diagnostics refer to the complete joint optimization-scale problem, including all responses. No dual certificate is reported.

Inherent implementation

impl MultivariateFit

coefficients

pub fn coefficients(&self) -> &[f64]

Original-scale coefficients in response-major order.

coefficients_for_response

pub fn coefficients_for_response(&self, response: usize) -> Option<&[f64]>

Original-scale feature coefficients for one response.

intercepts

pub fn intercepts(&self) -> &[f64]

Original-scale intercepts, including each response's centering correction.

iterations

pub fn iterations(&self) -> usize

Number of accepted joint proximal updates.

layout

pub fn layout(&self) -> CoefficientLayout

Explicit feature and response dimensions of the fitted coefficients.

objective

pub fn objective(&self) -> f64

Final primal objective P(beta_0, beta) = F(beta_0, beta) + R(beta).

predict

pub fn predict<M: RawColumns<f64> + ?Sized>(
    &self,
    x: &M
) -> Result<Vec<f64>, FitError>

Predict response columns from raw training-order features.

Entry (observation, response) has index response * x.nrows() + observation. Prediction uses fitted parameters without estimating new statistics. Empty prediction batches return an empty vector.

Errors

Reject feature-count mismatches, invalid entries, dimension overflow, or nonfinite arithmetic.

preprocessing

pub fn preprocessing(&self) -> &Preprocessing

Shared training-feature normalization metadata.

step_size

pub fn step_size(&self) -> f64

Step that passed the final smooth quadratic-bound check.

stopping_criterion

pub fn stopping_criterion(&self) -> StoppingCriterion

Criterion selected for the joint fit.

stopping_threshold

pub fn stopping_threshold(&self) -> f64

Absolute mapping threshold used to certify convergence.

stopping_value

pub fn stopping_value(&self) -> f64

Infinity norm of the complete coefficient mapping and all free-intercept derivatives, evaluated at the returned parameters.

termination

pub fn termination(&self) -> Termination

Whether the joint fit converged or exhausted its iteration budget.

Implementation of Clone

impl Clone for MultivariateFit

clone

fn clone(&self) -> Self

Implementation of Debug

impl Debug for MultivariateFit

fmt

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

Implementation of Freeze

impl Freeze for MultivariateFit

Implementation of RefUnwindSafe

impl RefUnwindSafe for MultivariateFit

Implementation of Send

impl Send for MultivariateFit

Implementation of Sync

impl Sync for MultivariateFit

Implementation of Unpin

impl Unpin for MultivariateFit

Implementation of UnsafeUnpin

impl UnsafeUnpin for MultivariateFit

Implementation of UnwindSafe

impl UnwindSafe for MultivariateFit

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>