_check_binary_input#

anomalearn.utils.metrics._check_binary_input(y_true, y_pred) tuple[numpy.ndarray, numpy.ndarray]#

Checks that the input is the result of binary classification.

Parameters:
  • y_true (array-like of shape (n_samples,)) – The real labels for the points.

  • y_pred (array-like of shape (n_samples,)) – The predicted labels for the points.

Returns:

  • numpy_y_true (np.ndarray of shape (n_samples,)) – The numpy array of y_true.

  • numpy_y_pred (np.ndarray of shape (n_samples,)) – The numpy array of y_pred.

Raises:

ValueError – If the arrays in input are not 1D, if they have more than 2 labels or if the labels are not 0 and 1.