morphoclass.transforms.scalers.robust_scaler module¶
Implementation of the robust scaler transform.
-
class
morphoclass.transforms.scalers.robust_scaler.FeatureRobustScaler(feature_indices, with_centering=True, with_scaling=True, **kwargs)¶ Bases:
morphoclass.transforms.scalers.abstract_scaler.AbstractFeatureScalerScaler that is robust against outliers in data.
Internally the RobustScaler from scikit-learn is applied.
- Parameters
feature_indices – List of indices of the feature maps to which to apply the scaling.
with_centering (bool (optional)) – If True, center the data before scaling. This value is passed through to the RobustScaler class in sklearn.
with_scaling (bool (optional)) – If True, scale the data to interquartile range. This value is passed through to the RobustScaler class in sklearn.
kwargs – Additional keyword argument to pass through to the AbstractFeatureScaler base class.
-
get_config()¶ Generate the configuration necessary for reconstructing the scaler.
- Returns
config – The configuration of the scaler. It should contain all information necessary for reconstructing the scaler using the scaler_from_config function.
- Return type
dict
-
reconstruct(params)¶ Reconstruct the configuration from parameters.
- Parameters
params (dict) – The parameters found in config[“params”] with the config being the dictionary returned by get_config.