class_docstr: Mixin class to be used in Displays requiring a binary classifier.
  
  The aim of this class is to centralize some validations regarding the estimator and
  the target and gather the response of the estimator.
class_docstr_tok: ["Mixin","class","to","be","used","in","Displays","requiring","a","binary","classifier",".","The","aim","of","this","class","is","to","centralize","some","validations","regarding","the","estimator","and","the","target","and","gather","the","response","of","the","estimator","."]
code: def _validate_from_predictions_params(
      cls,
      y_true,
      y_pred,
      *,
      sample_weight=None,
      pos_label=None,
      name=None,
  ):
      check_matplotlib_support(f"{cls.__name__}.from_predictions")
  
      if type_of_target(y_true) != "binary":
          raise ValueError(
              f"The target y is not binary. Got {type_of_target(y_true)} type of"
              " target."
          )
  
      check_consistent_length(y_true, y_pred, sample_weight)
      pos_label = _check_pos_label_consistency(pos_label, y_true)
  
      name = name if name is not None else "Classifier"
  
      return pos_label, name
  
file_path: catboost/contrib/python/scikit-learn/py3/sklearn/utils/_plotting.py
imports: import numpy
  from .None import check_consistent_length, check_matplotlib_support
  from ._response import _get_response_values_binary
  from .multiclass import type_of_target
  from .validation import _check_pos_label_consistency
label_desc: Use image node_id 3 for calling the _BinaryClassifierCurveDisplayMixin obj's underlying member method code with example usage: obj._validate_from_predictions_params(cls, y_true, y_pred) and returns: pos_label,  name