Struct linfa_pls::PlsRegression
source · [−]pub struct PlsRegression<F: Float>(_);
Implementations
sourceimpl<F: Float> PlsRegression<F>
impl<F: Float> PlsRegression<F>
pub fn params(n_components: usize) -> PlsRegressionParams<F>
sourcepub fn weights(&self) -> (&Array2<F>, &Array2<F>)
pub fn weights(&self) -> (&Array2<F>, &Array2<F>)
Singular vectors of the cross-covariance matrices
sourcepub fn rotations(&self) -> (&Array2<F>, &Array2<F>)
pub fn rotations(&self) -> (&Array2<F>, &Array2<F>)
Projection matrices used to transform records and targets
sourcepub fn coefficients(&self) -> &Array2<F>
pub fn coefficients(&self) -> &Array2<F>
The coefficients of the linear model such that Y is approximated as Y = X.coefficients
sourcepub fn inverse_transform(
&self,
dataset: DatasetBase<ArrayBase<impl Data<Elem = F>, Ix2>, ArrayBase<impl Data<Elem = F>, Ix2>>
) -> DatasetBase<Array2<F>, Array2<F>>
pub fn inverse_transform(
&self,
dataset: DatasetBase<ArrayBase<impl Data<Elem = F>, Ix2>, ArrayBase<impl Data<Elem = F>, Ix2>>
) -> DatasetBase<Array2<F>, Array2<F>>
Transform the given dataset in the projected space back to the original space.
Trait Implementations
sourceimpl<F: Float, D: Data<Elem = F>> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for PlsRegression<F>
impl<F: Float, D: Data<Elem = F>> PredictInplace<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>> for PlsRegression<F>
sourcefn predict_inplace<'a>(&'a self, x: &ArrayBase<D, Ix2>, y: &mut Array2<F>)
fn predict_inplace<'a>(&'a self, x: &ArrayBase<D, Ix2>, y: &mut Array2<F>)
Given an input matrix X
, with shape (n_samples, n_features)
,
predict
returns the target variable according to [<Pls $name>] method
learned from the training data distribution.
sourcefn default_target(&self, x: &ArrayBase<D, Ix2>) -> Array2<F>
fn default_target(&self, x: &ArrayBase<D, Ix2>) -> Array2<F>
Create targets that predict_inplace
works with.
sourceimpl<F: Float, D: Data<Elem = F>> Transformer<DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<D, Dim<[usize; 2]>>>, DatasetBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>>> for PlsRegression<F>
impl<F: Float, D: Data<Elem = F>> Transformer<DatasetBase<ArrayBase<D, Dim<[usize; 2]>>, ArrayBase<D, Dim<[usize; 2]>>>, DatasetBase<ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>, ArrayBase<OwnedRepr<F>, Dim<[usize; 2]>>>> for PlsRegression<F>
sourcefn transform(
&self,
dataset: DatasetBase<ArrayBase<D, Ix2>, ArrayBase<D, Ix2>>
) -> DatasetBase<Array2<F>, Array2<F>>
fn transform(
&self,
dataset: DatasetBase<ArrayBase<D, Ix2>, ArrayBase<D, Ix2>>
) -> DatasetBase<Array2<F>, Array2<F>>
Apply dimension reduction to the given dataset
Auto Trait Implementations
impl<F> RefUnwindSafe for PlsRegression<F> where
F: RefUnwindSafe,
impl<F> Send for PlsRegression<F>
impl<F> Sync for PlsRegression<F>
impl<F> Unpin for PlsRegression<F>
impl<F> UnwindSafe for PlsRegression<F> where
F: RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more