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