Transformer

Trait Transformer 

Source
pub trait Transformer<T> {
    // Required methods
    fn fit(&mut self, inputs: &T) -> Result<(), Error>;
    fn transform(&mut self, inputs: T) -> Result<T, Error>;
}
Expand description

Trait for data transformers

Required Methods§

Source

fn fit(&mut self, inputs: &T) -> Result<(), Error>

Fit Transformer to input data, and stores the transformation in the Transformer

Source

fn transform(&mut self, inputs: T) -> Result<T, Error>

Transforms the inputs and stores the transformation in the Transformer

Implementors§

Source§

impl<R: Rng, T> Transformer<Matrix<T>> for Shuffler<R>

The Shuffler will transform the input Matrix by shuffling its rows in place.

Under the hood this uses a Fisher-Yates shuffle.

Source§

impl<T: Float + FromPrimitive> Transformer<Matrix<T>> for Standardizer<T>

Source§

impl<T: Float> Transformer<Matrix<T>> for MinMaxScaler<T>