class_docstr: Plot ROC curve
  
  Parameters
  ----------
  fpr : ndarray of shape (>2,), list of lists or list of numbers
      Increasing false positive rates such that element i is the false
      positive rate of predictions with score >= `thresholds[i]`.
  
  tpr : ndarray of shape (>2,), list of lists or list of numbers
      Increasing true positive rates such that element `i` is the true
      positive rate of predictions with score >= `thresholds[i]`.
  
  label : list of str, default: None
      Set curve labels
  
  ax: matplotlib Axes, default: None
      Axes object to draw the plot onto, otherwise uses current Axes
  
  Examples
  --------
  .. plot:: ../examples/roc_binary_classification.py
  
  .. plot:: ../examples/roc_comparison.py
  
  .. plot:: ../examples/roc_multi_classification.py
  
  Notes
  -----
  .. versionadded:: 0.8.4
docstr: Plot ROC curve
  Parameters
  ----------
  y_true : array-like, shape = [n_samples]
      Correct target values (ground truth).
  
  y_score : array-like, shape = [n_samples] or [n_samples, 2] for binary
      classification or [n_samples, n_classes] for multiclass
      Target scores (estimator predictions).
  
  Returns
  -------
  fpr : list of lists with fpr values
  
  tpr : list of lists with tpr values
  
  label : list of str for curves label
docstr_tok: ["Plot","ROC","curve","Parameters","--","--","--","--","--","y_true",":","array-like",",","shape","=","[","n_samples","]","Correct","target","values","(","ground","truth",")",".","y_score",":","array-like",",","shape","=","[","n_samples","]","or","[","n_samples",",","2","]","for","binary","classification","or","[","n_samples",",","n_classes","]","for","multiclass","Target","scores","(","estimator","predictions",")",".","Returns","--","--","--","-","fpr",":","list","of","lists","with","fpr","values","tpr",":","list","of","lists","with","tpr","values","label",":","list","of","str","for","curves","label"]
code: def _calculate_plotting_data(y_true, y_score):
      """
      Plot ROC curve
      Parameters
      ----------
      y_true : array-like, shape = [n_samples]
          Correct target values (ground truth).
  
      y_score : array-like, shape = [n_samples] or [n_samples, 2] for binary
          classification or [n_samples, n_classes] for multiclass
          Target scores (estimator predictions).
  
      Returns
      -------
      fpr : list of lists with fpr values
  
      tpr : list of lists with tpr values
  
      label : list of str for curves label
      """
      if any((val is None for val in (y_true, y_score))):
          raise ValueError("y_true and y_score are needed to plot ROC")
  
      label = []
  
      # get the number of classes based on the shape of y_score
      y_score_is_vector = is_column_vector(y_score) or is_row_vector(
          y_score
      )
      if y_score_is_vector:
          n_classes = 2
      else:
          _, n_classes = y_score.shape
  
      if n_classes > 2:
          # convert y_true to binary format
          y_true_bin = label_binarize(y_true, classes=np.unique(y_true))
  
          fpr = []
          tpr = []
  
          avg_fpr, avg_tpr, _ = _roc_curve_multi(y_true_bin, y_score)
  
          label.append("micro-average ROC curve")
          fpr.append(avg_fpr)
          tpr.append(avg_tpr)
  
          for i in range(n_classes):
              fpr_, tpr_, _ = roc_curve(y_true_bin[:, i], y_score[:, i])
  
              label.append("ROC curve")
              fpr.append(fpr_)
              tpr.append(tpr_)
      else:
          if y_score_is_vector:
              fpr, tpr, _ = roc_curve(y_true, y_score)
          else:
              fpr, tpr, _ = roc_curve(y_true, y_score[:, 1])
  
          fpr = [fpr]
          tpr = [tpr]
  
      return fpr, tpr, label
  
imports: import numpy
  import matplotlib.pyplot
  from sklearn.metrics import roc_curve, auc
  from sklearn.preprocessing import label_binarize
  from ..telemetry import SKLearnEvaluationLogger
  from ..util import is_column_vector, is_row_vector
  from sklearn_evaluation import __version__
  import json
  from pathlib import Path
  from sklearn_evaluation.plot.plot import AbstractPlot, AbstractComposedPlot
  from ploomber_core.exceptions import modify_exceptions
label_desc: Use image node_id 8 for calling the ROC obj's underlying member method code with example usage: obj._calculate_plotting_data(y_true, y_score) and returns: fpr,  tpr,  label