InvalidTargetDataCheck.
validate
Checks if the target data contains missing or invalid values.
X (pd.DataFrame, pd.Series, np.array, list) – Features. Ignored.
y – Target data to check for invalid values.
List with DataCheckErrors if any invalid values are found in the target data.
list (DataCheckError)
Example
>>> X = pd.DataFrame({}) >>> y = pd.Series([0, 1, None, None]) >>> target_check = InvalidTargetDataCheck('binary') >>> assert target_check.validate(X, y) == [DataCheckError("2 row(s) (50.0%) of target values are null", "InvalidTargetDataCheck")]