pub struct StandardScaler {
pub mean_: Option<Vec<f32>>,
pub std_: Option<Vec<f32>>,
pub with_mean: bool,
pub with_std: bool,
}Expand description
Standard Scaler - standardize features by removing mean and scaling to unit variance
Fields§
§mean_: Option<Vec<f32>>§std_: Option<Vec<f32>>§with_mean: bool§with_std: boolImplementations§
Source§impl StandardScaler
impl StandardScaler
pub fn new() -> Self
pub fn with_mean(self, with_mean: bool) -> Self
pub fn with_std(self, with_std: bool) -> Self
pub fn fit(&mut self, x: &Tensor)
pub fn transform(&self, x: &Tensor) -> Tensor
pub fn fit_transform(&mut self, x: &Tensor) -> Tensor
pub fn inverse_transform(&self, x: &Tensor) -> Tensor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for StandardScaler
impl RefUnwindSafe for StandardScaler
impl Send for StandardScaler
impl Sync for StandardScaler
impl Unpin for StandardScaler
impl UnwindSafe for StandardScaler
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more