direpack.preprocessing.gsspp.GenSpatialSignPreProcessor

class GenSpatialSignPreProcessor(center='l1median', fun='linear_redescending')[source]

GenSpatialSignPreProcessor Generalized Spatial Sign Pre-Processing as a scikit-learn compatible object that can be used in ML pipelines.

Parameters
  • center (str or function,) – location estimator for centring.str options: ‘mean’, ‘median’, ‘l1median’, ‘kstepLTS’, ‘None’

  • fun (str or function,) – radial transformation function, str options: ‘ss’ (the non-generalized spatial sign, equivalent to sklearn’s Normalizer), ‘ball’, ‘shell’, ‘quad’ (quadratic), ‘winsor’, or ‘linear_redescending’ Methods: sklearn API: fit(X), transform(X) and fit_transform(X) with

Attributes always provided
  • gss_ : the generalized spatial signs

  • Xm_ : the centred data

  • centring_ : VersatileScaler centring object

  • X_gss_pp_ : Data preprocessed by Generalized Spatial Sign

__init__(center='l1median', fun='linear_redescending')[source]

Methods

__init__([center, fun])

fit(X)

Calculate and store generalized spatial signs

fit_transform(X)

Fit to data, then transform it.

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.

transform(X)

Calculate Generalized Spatial Sign Pre-Pprocessed Data