lale.lib.sklearn.robust_scaler module

class lale.lib.sklearn.robust_scaler.RobustScaler(*, with_centering=True, with_scaling=True, quantile_range='(0.25, 0.75)', copy=True, unit_variance=False)

Bases: PlannedIndividualOp

Robust scaler transformer from scikit-learn.

This documentation is auto-generated from JSON schemas.

Parameters
  • with_centering (boolean, optional, default True) –

    If True, center the data before scaling.

    See also constraint-1.

  • with_scaling (boolean, optional, default True) – If True, scale the data to interquartile range.

  • quantile_range (tuple, >=2 items for optimizer, <=2 items for optimizer, default (0.25, 0.75)) –

    Default: (25.0, 75.0) = (1st quantile, 3rd quantile) = IQR

    • item 0 : float, >=0.001 for optimizer, <=0.3 for optimizer

    • item 1 : float, >=0.7 for optimizer, <=0.999 for optimizer

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

  • unit_variance (boolean, optional, not for optimizer, default False) – If True, scale data so that normally distributed features have a variance of 1. In general, if the difference between the x-values of q_max and q_min for a standard normal distribution is greater than 1, the dataset will be scaled down. If less than 1, the dataset will be scaled up.

Notes

constraint-1 : union type

Cannot center sparse matrices: use with_centering=False instead. See docstring for motivation and alternatives.

  • with_centering : 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 median and quantiles

  • y (any type, optional) –

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, optional of items : array of items : float) – The data used to scale along the specified axis.

Returns

result – Center and scale the data.

Return type

array of items : array of items : float