pub struct Standardizer<T: Float> { /* private fields */ }Expand description
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.
Implementations§
Source§impl<T: Float> Standardizer<T>
impl<T: Float> Standardizer<T>
Sourcepub fn new(mean: T, stdev: T) -> Standardizer<T>
pub 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§
Source§impl<T: Float> Default for Standardizer<T>
Create a Standardizer with mean 0 and standard
deviation 1.
impl<T: Float> Default for Standardizer<T>
Create a Standardizer with mean 0 and standard
deviation 1.
Source§fn default() -> Standardizer<T>
fn default() -> Standardizer<T>
Returns the “default value” for a type. Read more
Source§impl<T: Float + FromPrimitive> Invertible<Matrix<T>> for Standardizer<T>
impl<T: Float + FromPrimitive> Invertible<Matrix<T>> for Standardizer<T>
Source§impl<T: Float + FromPrimitive> Transformer<Matrix<T>> for Standardizer<T>
impl<T: Float + FromPrimitive> Transformer<Matrix<T>> for Standardizer<T>
Auto Trait Implementations§
impl<T> Freeze for Standardizer<T>where
T: Freeze,
impl<T> RefUnwindSafe for Standardizer<T>where
T: RefUnwindSafe,
impl<T> Send for Standardizer<T>where
T: Send,
impl<T> Sync for Standardizer<T>where
T: Sync,
impl<T> Unpin for Standardizer<T>where
T: Unpin,
impl<T> UnwindSafe for Standardizer<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more