Struct rusty_machine::data::transforms::standardize::Standardizer
[−]
[src]
pub struct Standardizer<T: Float> { /* fields omitted */ }
The Standardizer
The Standardizer provides an implementation of Transformer
which allows us to transform the input data to have a new mean
and standard deviation.
See the module description for more information.
Methods
impl<T: Float> Standardizer<T>
[src]
fn new(mean: T, stdev: T) -> Standardizer<T>
Constructs a new Standardizer
with the given mean and variance
Examples
use rusty_machine::data::transforms::Standardizer; // Constructs a new `Standardizer` which will give the data // mean `0` and standard deviation `2`. let transformer = Standardizer::new(0.0, 2.0);
Trait Implementations
impl<T: Debug + Float> Debug for Standardizer<T>
[src]
impl<T: Float> Default for Standardizer<T>
[src]
Create a Standardizer
with mean 0
and standard
deviation 1
.
fn default() -> Standardizer<T>
Returns the "default value" for a type. Read more
impl<T: Float + FromPrimitive> Transformer<Matrix<T>> for Standardizer<T>
[src]
fn fit(&mut self, inputs: &Matrix<T>) -> Result<(), Error>
Fit Transformer to input data, and stores the transformation in the Transformer
fn transform(&mut self, inputs: Matrix<T>) -> Result<Matrix<T>, Error>
Transforms the inputs and stores the transformation in the Transformer
impl<T: Float + FromPrimitive> Invertible<Matrix<T>> for Standardizer<T>
[src]
fn inv_transform(&self, inputs: Matrix<T>) -> Result<Matrix<T>, Error>
Maps the inputs using the inverse of the fitted transform.