lale.lib.sklearn.missing_indicator module

class lale.lib.sklearn.missing_indicator.MissingIndicator(*, missing_values=nan, features='missing-only', sparse='auto', error_on_new=True)

Bases: PlannedIndividualOp

Missing values indicator transformer from scikit-learn.

This documentation is auto-generated from JSON schemas.

Parameters
  • missing_values (union type, not for optimizer, default nan) –

    The placeholder for the missing values.

    • float

    • or string

    • or nan

    • or None

    See also constraint-2.

  • features (‘missing-only’ or ‘all’, not for optimizer, default ‘missing-only’) –

    Whether the imputer mask should represent all or a subset of features.

    See also constraint-1.

  • sparse (union type, not for optimizer, default 'auto') –

    Whether the imputer mask format should be sparse or dense.

    • boolean

    • or ‘auto’

  • error_on_new (boolean, not for optimizer, default True) –

    If True (default), transform will raise an error when there are

    See also constraint-1.

Notes

constraint-1 : union type

error_on_new, only when features=”missing-only”

  • error_on_new : True

  • or features : ‘missing-only’

constraint-2 : union type

Sparse input with missing_values=0 is not supported. Provide a dense array instead.

  • negated type of ‘X/isSparse’

  • or missing_values : negated type of 0

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) – Input data, where n_samples is the number of samples and

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 input data to complete.

Returns

result – The missing indicator for input data.

Return type

array of items : array of items : boolean