.. _`Robust Scaler`: .. _`org.sysess.sympathy.machinelearning.robust_scaler`: Robust Scaler ~~~~~~~~~~~~~ .. image:: scaler.svg :width: 48 Scale features using statistics that are robust to outliers. This Scaler removes the median and scales the data according to the quantile range (defaults to IQR: Interquartile Range). The IQR is the range between the 1st quartile (25th quantile) and the 3rd quartile (75th quantile). Centering and scaling happen independently on each feature (or each sample, depending on the axis argument) by computing the relevant statistics on the samples in the training set. Median and interquartile range 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. Typically this is done by removing the mean and scaling to unit variance. However, outliers can often influence the sample mean / variance in a negative way. In such cases, the median and the interquartile range often give better results. *Configuration*: - *with_centering* If True, center the data before scaling. This will cause ``transform`` to 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_scaling* If True, scale the data to interquartile range. - *quantile_range* Default: (25.0, 75.0) = (1st quantile, 3rd quantile) = IQR Quantile range used to calculate ``scale_``. .. versionadded:: 0.18 *Attributes*: - *center_* The median value for each feature in the training set. - *scale_* The (scaled) interquartile range for each feature in the training set. .. versionadded:: 0.17 *scale_* attribute. *Input ports*: *Output ports*: **model** : model Model **with_centering** (with_centering) If True, center the data before scaling. This will cause ``transform`` to 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_scaling** (with_scaling) If True, scale the data to interquartile range. **quantile_range** (quantile_range) Default: (25.0, 75.0) = (1st quantile, 3rd quantile) = IQR Quantile range used to calculate ``scale_``. .. versionadded:: 0.18 .. automodule:: node_preprocessing .. class:: RobustScaler