{
  "slug": "class-prevalence",
  "term": "Class prevalence",
  "aliases": [
    "positive-class prevalence",
    "class proportion"
  ],
  "definition": "Class prevalence is the proportion of observations belonging to a specified class in a defined population or evaluation sample.",
  "note": "For a nonempty binary sample, positive prevalence = (TP + FN) / (TP + FP + FN + TN). Predicting every observation positive gives precision equal to that prevalence. [sklearn-pr-curve] Sampling more failures changes the evaluation prevalence and may change precision; a balanced test sample does not directly establish deployment alert quality. [saito2015] For storage, specify whether an observation is a drive or a drive-day window, and whether positive means failure within a stated horizon; this proportion is not AFR. [hesela-prediction]",
  "limitations": [],
  "related": [
    "precision",
    "recall",
    "false-positive-rate",
    "average-precision",
    "drive-day",
    "afr"
  ],
  "citations": [
    {
      "id": "sklearn-pr-curve",
      "title": "scikit-learn: precision_recall_curve; the all-positive endpoint.",
      "url": "https://scikit-learn.org/stable/modules/generated/sklearn.metrics.precision_recall_curve.html",
      "accessed": "2026-10-12"
    },
    {
      "id": "saito2015",
      "title": "Saito and Rehmsmeier. The Precision-Recall Plot Is More Informative than the ROC Plot When Evaluating Binary Classifiers on Imbalanced Datasets. PLOS ONE 10(3): e0118432 (2015).",
      "url": "https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0118432",
      "accessed": "2026-10-12"
    },
    {
      "id": "hesela-prediction",
      "title": "Hesela: disk failure prediction, metric denominators and a synthetic alert-count example.",
      "url": "https://hesela.com/analyses/ml-disk-failure-prediction/",
      "accessed": "2026-10-12"
    }
  ],
  "status": "shipping",
  "advantages": [],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-10-12"
}
