Shrinkage

shrinkage::RowSubset

Shrinkage for Rust · rust · 0.3.0

pub trait RowSubset: RawColumns<f64> + ColumnStats<f64>

Select raw observations before fitting training-fold preprocessing.

Selected designs retain column order and use the same backend error type. Implementations must neither estimate nor apply normalization. The built-in dense and CSC integrations copy only selected entries into owned storage, then delegate statistics and products to LazyMatrix's backend integrations. Custom backends can supply their own raw selection implementation.

Associated types

Subset

type Subset: RawColumns<f64> + ColumnStats<f64, Error = <Self as >::Error>;

Selected raw design used by the fold's ordinary path solver.

Methods

select_rows

fn select_rows(
    &self,
    rows: &[usize]
) -> Result<<Self as RowSubset>::Subset, FitError<<Self as >::Error>>

Select strictly increasing original row indices without changing columns.

Errors

Reject repeated, unsorted, or out-of-bounds indices and backend failures.