Struct rusty_machine::data::transforms::minmax::MinMaxFitter
source · [−]pub struct MinMaxFitter<T: Float> { /* private fields */ }
Expand description
A builder used to construct a MinMaxScaler
Implementations
sourceimpl<T: Float> MinMaxFitter<T>
impl<T: Float> MinMaxFitter<T>
sourcepub fn new(min: T, max: T) -> Self
pub fn new(min: T, max: T) -> Self
Construct a new MinMaxFitter
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::MinMaxFitter;
use rusty_machine::linalg::Matrix;
let fitter = MinMaxFitter::new(0.0, 1.0);
// We can call `fit` from the `transform::TransformFitter`
// trait to create a `MinMaxScaler` 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 MinMaxFitter<T>
impl<T: Debug + Float> Debug for MinMaxFitter<T>
sourceimpl<T: Float> Default for MinMaxFitter<T>
impl<T: Float> Default for MinMaxFitter<T>
sourceimpl<T: Float> TransformFitter<Matrix<T>, MinMaxScaler<T>> for MinMaxFitter<T>
impl<T: Float> TransformFitter<Matrix<T>, MinMaxScaler<T>> for MinMaxFitter<T>
sourcefn fit(self, inputs: &Matrix<T>) -> LearningResult<MinMaxScaler<T>>
fn fit(self, inputs: &Matrix<T>) -> LearningResult<MinMaxScaler<T>>
Fit the inputs to create the
Transformer
Auto Trait Implementations
impl<T> RefUnwindSafe for MinMaxFitter<T>where
T: RefUnwindSafe,
impl<T> Send for MinMaxFitter<T>where
T: Send,
impl<T> Sync for MinMaxFitter<T>where
T: Sync,
impl<T> Unpin for MinMaxFitter<T>where
T: Unpin,
impl<T> UnwindSafe for MinMaxFitter<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