no_variance_data_check

Module Contents

Classes Summary

NoVarianceDataCheck

Check if the target or any of the features have no variance.

Attributes Summary

logger

Contents

evalml.data_checks.no_variance_data_check.logger
class evalml.data_checks.no_variance_data_check.NoVarianceDataCheck(count_nan_as_value=False)[source]

Check if the target or any of the features have no variance.

Parameters

count_nan_as_value (bool) – If True, missing values will be counted as their own unique value. Additionally, if true, will return a DataCheckWarning instead of an error if the feature has mostly missing data and only one unique value. Defaults to False.

Methods

name

Returns a name describing the data check.

validate

Check if the target or any of the features have no variance (1 unique value).

name(cls)

Returns a name describing the data check.

validate(self, X, y)[source]

Check if the target or any of the features have no variance (1 unique value).

Parameters
  • X (pd.DataFrame, np.ndarray) – The input features.

  • y (pd.Series, np.ndarray) – The target data.

Returns

dict of warnings/errors corresponding to features or target with no variance.

Return type

dict