lale.lib.autogen.multi_label_binarizer module

class lale.lib.autogen.multi_label_binarizer.MultiLabelBinarizer(*, classes=None, sparse_output=False)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • classes (None, not for optimizer, default None) – Indicates an ordering for the class labels

  • sparse_output (boolean, default False) – Set to true if output binary array is desired in CSR sparse 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 (Any) – A set of labels (any orderable and hashable object) for each sample

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 (Any) – A set of labels (any orderable and hashable object) for each sample

Returns

result – A matrix such that y_indicator[i, j] = 1 iff classes_[j] is in y[i], and 0 otherwise.

Return type

Any