lale.lib.autogen.binarizer module¶
- class lale.lib.autogen.binarizer.Binarizer(*, threshold=0.0, copy=True)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
threshold (float, not for optimizer, default 0.0) – Feature values below or equal to this are replaced by 0, above it by 1
copy (boolean, default True) – set to False to perform inplace binarization and avoid a copy (if the input is already a numpy array or a scipy.sparse CSR matrix).
- 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 : Any) –
- 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 binarize, element by element
y (Any, optional) –
copy (boolean, optional) – Copy the input X or not.
- Returns
result – Binarize each element of X
- Return type
Any