lale.lib.sklearn.variance_threshold module

class lale.lib.sklearn.variance_threshold.VarianceThreshold(*, threshold=0)

Bases: PlannedIndividualOp

VarianceThreshold transformer from scikit-learn.

This documentation is auto-generated from JSON schemas.

Parameters

threshold (union type, default 0) –

Features with a training-set variance lower than this threshold will be removed. The default is to keep all features with non-zero variance, i.e. remove the features that have the same value in all samples.

  • float, >0, <=1 for optimizer, loguniform distribution, default 0

    Features with a training-set variance lower than this threshold will be removed. The default is to keep all features with non-zero variance, i.e. remove the features that have the same value in all samples.

  • or 0

    Keep all features with non-zero variance, i.e. remove the features that have the same value in all samples

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 (unused).

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) –

Returns

result

Return type

array of items : array of items : float