Standard Scaler

../../../../_images/scaler.svg

Standardize features by removing the mean and scaling to unit variance.

Centering and scaling happen independently on each feature by computing the relevant statistics on the samples in the training set. Mean and standard deviation are then stored to be used on later data using the transform method. Standardization of a dataset is a common requirement for many machine learning estimators: they might behave badly if the individual feature do not more or less look like standard normally distributed data (e.g. Gaussian with 0 mean and unit variance).

Configuration:
  • with_mean

    If True, center the data before scaling. This does not work (and will raise an exception) when attempted on sparse matrices, because centering them entails building a dense matrix which in common use cases is likely to be too large to fit in memory.

  • with_std

    If True, scale the data to unit variance (or equivalently, unit standard deviation).

Attributes:
  • scale_

    Per feature relative scaling of the data.

    New in version 0.17: scale_

  • mean_

    The mean value for each feature in the training set.

  • var_

    The variance for each feature in the training set. Used to compute scale_

  • n_samples_seen_

    The number of samples processed by the estimator. Will be reset on new calls to fit, but increments across partial_fit calls.

Inputs:
Outputs:
model : model

Model

Ports:

Outputs:

model:

model

Model

Configuration:

with_mean
If True, center the data before scaling. This does not work (and will raise an exception) when attempted on sparse matrices, because centering them entails building a dense matrix which in common use cases is likely to be too large to fit in memory.
with_std
If True, scale the data to unit variance (or equivalently, unit standard deviation).

Some of the docstrings for this module have been automatically extracted from the scikit-learn library and are covered by their respective licenses.

class node_preprocessing.StandardScaler[source]