Struct rusty_machine::data::transforms::standardize::StandardizerFitter
source · [−]pub struct StandardizerFitter<T: Float> { /* private fields */ }
Expand description
A builder used to construct a Standardizer
Implementations
sourceimpl<T: Float> StandardizerFitter<T>
impl<T: Float> StandardizerFitter<T>
sourcepub fn new(mean: T, stdev: T) -> StandardizerFitter<T>
pub fn new(mean: T, stdev: T) -> StandardizerFitter<T>
Construct a new StandardizerFitter
with
specified mean and standard deviation.
Note that this function does not create a Transformer
only a builder which can be used to produce a fitted Transformer
.
Examples
use rusty_machine::data::transforms::StandardizerFitter;
use rusty_machine::linalg::Matrix;
let fitter = StandardizerFitter::new(0.0, 1.0);
// We can call `fit` from the `transform::TransformFitter`
// trait to create a `Standardizer` used to actually transform data.
use rusty_machine::data::transforms::TransformFitter;
let mat = Matrix::new(2, 2, vec![1.0, 2.0, 3.0, 5.0]);
let transformer = fitter.fit(&mat);
Trait Implementations
sourceimpl<T: Debug + Float> Debug for StandardizerFitter<T>
impl<T: Debug + Float> Debug for StandardizerFitter<T>
sourceimpl<T: Float> Default for StandardizerFitter<T>
impl<T: Float> Default for StandardizerFitter<T>
sourceimpl<T: Float + FromPrimitive> TransformFitter<Matrix<T>, Standardizer<T>> for StandardizerFitter<T>
impl<T: Float + FromPrimitive> TransformFitter<Matrix<T>, Standardizer<T>> for StandardizerFitter<T>
sourcefn fit(self, inputs: &Matrix<T>) -> LearningResult<Standardizer<T>>
fn fit(self, inputs: &Matrix<T>) -> LearningResult<Standardizer<T>>
Fit the inputs to create the
Transformer
Auto Trait Implementations
impl<T> RefUnwindSafe for StandardizerFitter<T>where
T: RefUnwindSafe,
impl<T> Send for StandardizerFitter<T>where
T: Send,
impl<T> Sync for StandardizerFitter<T>where
T: Sync,
impl<T> Unpin for StandardizerFitter<T>where
T: Unpin,
impl<T> UnwindSafe for StandardizerFitter<T>where
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more