pub struct StandardScaler { /* private fields */ }Expand description
Online standard scaler that standardizes features to approximately zero mean and unit variance.
- When
with_mean = false, the mean subtraction is skipped. - When
with_std = false, the scaling is skipped. - When a feature has seen zero samples, its mean is
0and scale is1, so the original value is returned unchanged. - When a feature’s variance is below
epsilon, the scale is1to avoid NaN or Infinity.
transform does not update state; only update does.
Implementations§
Source§impl StandardScaler
impl StandardScaler
Trait Implementations§
Source§impl Clone for StandardScaler
impl Clone for StandardScaler
Source§fn clone(&self) -> StandardScaler
fn clone(&self) -> StandardScaler
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StandardScaler
impl Debug for StandardScaler
Source§impl Transformer for StandardScaler
impl Transformer for StandardScaler
Source§fn output_dim(&self) -> usize
fn output_dim(&self) -> usize
Number of features produced by
transform.Source§fn transform(&self, features: &[f64]) -> Result<Vec<f64>, RillError>
fn transform(&self, features: &[f64]) -> Result<Vec<f64>, RillError>
Transform features using the current internal state.
Source§fn update(&mut self, features: &[f64]) -> Result<(), RillError>
fn update(&mut self, features: &[f64]) -> Result<(), RillError>
Update internal statistics using raw features.
Source§fn samples_seen(&self) -> u64
fn samples_seen(&self) -> u64
How many samples the transformer has seen.
Auto Trait Implementations§
impl Freeze for StandardScaler
impl RefUnwindSafe for StandardScaler
impl Send for StandardScaler
impl Sync for StandardScaler
impl Unpin for StandardScaler
impl UnsafeUnpin 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