{
  "name": "scikit-learn roc_auc_score: accepted inputs and options by problem type",
  "description": "Compiled from the scikit-learn 1.9.1 roc_auc_score reference page and the model-evaluation user guide (ROC section), read 2026-11-18. Each row states, for one problem type, what y_true and y_score must contain and which average and max_fpr values the documentation allows.",
  "page": "https://casrai.org/guides/sklearn-auroc",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-18T07:03:20Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Problem type",
      "unit": "",
      "description": ""
    },
    {
      "name": "y_true",
      "unit": "",
      "description": ""
    },
    {
      "name": "y_score",
      "unit": "",
      "description": ""
    },
    {
      "name": "average values documented",
      "unit": "",
      "description": ""
    },
    {
      "name": "max_fpr",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Problem type": "Binary",
      "y_true": "Shape (n_samples,)",
      "y_score": "Probability of the class with the greater label (classes_[1]), or non-thresholded decision values; shape (n_samples,)",
      "average values documented": "'samples' is ignored when y_true is binary",
      "max_fpr": "Float above 0 and up to 1 gives standardized partial AUC"
    },
    {
      "Problem type": "Multiclass, multi_class='ovr'",
      "y_true": "Shape (n_samples,)",
      "y_score": "predict_proba matrix, shape (n_samples, n_classes), rows sum to 1",
      "average values documented": "'macro' and 'weighted'; None and 'micro' only with 'ovr'",
      "max_fpr": "None or 1.0 only"
    },
    {
      "Problem type": "Multiclass, multi_class='ovo'",
      "y_true": "Shape (n_samples,)",
      "y_score": "predict_proba matrix, shape (n_samples, n_classes), rows sum to 1",
      "average values documented": "'macro' and 'weighted' only",
      "max_fpr": "None or 1.0 only"
    },
    {
      "Problem type": "Multilabel",
      "y_true": "Label-indicator array, shape (n_samples, n_classes)",
      "y_score": "Shape (n_samples, n_classes)",
      "average values documented": "'micro', 'macro', 'samples', 'weighted' or None",
      "max_fpr": "Restriction (None or 1.0) is documented for multiclass only"
    }
  ],
  "sources": [
    {
      "title": "scikit-learn: roc_auc_score",
      "url": "https://scikit-learn.org/stable/modules/generated/sklearn.metrics.roc_auc_score.html",
      "accessed": "2026-11-18"
    },
    {
      "title": "scikit-learn: Metrics and scoring",
      "url": "https://scikit-learn.org/stable/modules/model_evaluation.html",
      "accessed": "2026-11-18"
    }
  ]
}