Skip to main content

MatrixDesign

Struct MatrixDesign 

Source
pub struct MatrixDesign<'a, M: ?Sized, V = Vec<f64>> { /* private fields */ }
Expand description

A borrowed concrete LazyMatrix backend for runtime proximal composition.

V is the native vector accepted by the backend’s products. This adapter retains static column access and never depends on a datafit or penalty type.

Implementations§

Source§

impl<'a, M: ?Sized, V> MatrixDesign<'a, M, V>

Source

pub fn new(matrix: &'a M) -> Self

Borrow a backend; validation and normalization occur during fitting.

Trait Implementations§

Source§

impl<M, V> RuntimeDesign for MatrixDesign<'_, M, V>
where M: RawColumns<f64> + ColumnStats<f64> + MatVecInto<V> + MatTransposeVecInto<V> + ?Sized, M::Error: Error + 'static, V: ProximalVector + 'static,

Source§

fn nrows(&self) -> usize

Number of training observations.
Source§

fn ncols(&self) -> usize

Number of training features.
Source§

fn prepare( &self, normalization: Normalization, centers: Option<&[f64]>, scales: Option<&[f64]>, fit_intercept: bool, ) -> Result<Box<dyn ProximalDesign<Error = BackendError> + '_>, FitError<BackendError>>

Validate the design and prepare its normalized product oracle. Read more

Auto Trait Implementations§

§

impl<'a, M, V> Forget for MatrixDesign<'a, M, V>
where M: ?Sized,

§

impl<'a, M, V> Freeze for MatrixDesign<'a, M, V>
where &'a M: Freeze, PhantomData<V>: Freeze, M: ?Sized,

§

impl<'a, M, V> Move for MatrixDesign<'a, M, V>
where M: ?Sized,

§

impl<'a, M, V> RefUnwindSafe for MatrixDesign<'a, M, V>

§

impl<'a, M, V> Send for MatrixDesign<'a, M, V>
where &'a M: Send, PhantomData<V>: Send, M: ?Sized,

§

impl<'a, M, V> Sync for MatrixDesign<'a, M, V>
where &'a M: Sync, PhantomData<V>: Sync, M: ?Sized,

§

impl<'a, M, V> Unpin for MatrixDesign<'a, M, V>
where &'a M: Unpin, PhantomData<V>: Unpin, M: ?Sized,

§

impl<'a, M, V> UnsafeUnpin for MatrixDesign<'a, M, V>

§

impl<'a, M, V> UnwindSafe for MatrixDesign<'a, M, V>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.