lale.lib.autogen.label_binarizer module¶
- class lale.lib.autogen.label_binarizer.LabelBinarizer(*, neg_label=0, pos_label=1, sparse_output=False)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
neg_label (integer, >=0 for optimizer, <=1 for optimizer, uniform distribution, default 0) – Value with which negative labels must be encoded.
pos_label (integer, >=1 for optimizer, <=2 for optimizer, uniform distribution, default 1) – Value with which positive labels must be encoded.
sparse_output (boolean, default False) – True if the returned array from transform is desired to be in sparse CSR format.
- 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
y (union type) –
Target values
array of items : float
or array of items : array of items : float
- 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
y (union type) –
Target values
array of items : Any
or array of items : float
or array of items : array of items : float
- Returns
result – Shape will be [n_samples, 1] for binary problems.
- Return type
Any