lale.lib.sklearn.normalizer module

class lale.lib.sklearn.normalizer.Normalizer(*, norm='l2', copy=True)

Bases: PlannedIndividualOp

Normalizer transformer from scikit-learn.

This documentation is auto-generated from JSON schemas.

Parameters
  • norm (‘l1’, ‘l2’, or ‘max’, default ‘l2’) – The norm to use to normalize each non zero sample.

  • copy (boolean, optional, not for optimizer, default True) – Set to False to perform inplace row normalization and avoid a copy.

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) – Features; the outer array is over samples.

  • y (any type, optional) – Target class labels; the array is over samples.

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 to normalize, row by row. scipy.sparse matrices should be

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

    Copy the input X or not.

    • boolean

    • or None

Returns

result – Scale each non zero row of X to unit norm

Return type

array of items : array of items : float