Shrinkage

shrinkage::ScreeningDesign

Shrinkage for Rust · rust · 0.3.0

pub trait ScreeningDesign

Optional normalized-column operations that avoid screened matrix work.

Associated types

Error

type Error;

Backend failure type.

Methods

column_error_scales

fn column_error_scales(
    &mut self,
    output: &mut [f64]
) -> Result<(), FitError<<Self as ScreeningDesign>::Error>>

Write absolute product scales accounting for normalization cancellation.

A scale must bound the magnitudes entering a transposed product before cancellation, per unit Euclidean input norm.

Errors

Reject incompatible dimensions or unrepresentable scales.

column_norms

fn column_norms(
    &mut self,
    output: &mut [f64]
) -> Result<(), FitError<<Self as ScreeningDesign>::Error>>

Write upper bounds for Euclidean norms of optimization-scale columns.

Errors

Reject incompatible output dimensions or nonfinite arithmetic.

forward_active

fn forward_active(
    &mut self,
    input: &[f64],
    active: &[usize],
    output: &mut [f64]
) -> Result<(), FitError<<Self as ScreeningDesign>::Error>>

Multiply using only increasing, unique original indices in active.

Input has the original coefficient dimension; output has one entry per row.

Errors

Reject invalid dimensions or indices and preserve backend failures.

transpose_active

fn transpose_active(
    &mut self,
    input: &[f64],
    active: &[usize],
    output: &mut [f64]
) -> Result<(), FitError<<Self as ScreeningDesign>::Error>>

Write selected correlations into an original-length output, zeroing others.

active contains increasing, unique original feature indices.

Errors

Reject invalid dimensions or indices and preserve backend failures.