lale.lib.sklearn.standard_scaler module

class lale.lib.sklearn.standard_scaler.StandardScaler(*, copy=True, with_mean=True, with_std=True)

Bases: PlannedIndividualOp

Standard scaler transformer from scikit-learn.

This documentation is auto-generated from JSON schemas.

Parameters
  • copy (boolean, not for optimizer, default True) – If False, try to avoid a copy and do inplace scaling instead.

  • with_mean (boolean, default True) –

    If True, center the data before scaling.

    See also constraint-1.

  • with_std (boolean, default True) – If True, scale the data to unit variance (or equivalently, unit standard deviation).

Notes

constraint-1 : union type

Setting with_mean to True does not work 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_mean : False

  • or negated type of ‘X/isSparse’

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – The data used to compute the mean and standard deviation

  • y (any type, optional) – Ignored

partial_fit(X, y=None, **fit_params)

Incremental fit to train train the operator on a batch of samples.

Note: The partial_fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

transform(X, y=None)

Transform the data.

Note: The transform method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – The data used to scale along the features axis.

  • copy (union type, optional, default None) –

    Copy the input X or not.

    • boolean

    • or None

Returns

result – Perform standardization by centering and scaling

Return type

array of items : array of items : float