{
  "schemaVersion": 1,
  "kind": "synthetic arithmetic",
  "classOrder": [
    0,
    1
  ],
  "rows": "observed",
  "columns": "predicted",
  "unit": "one labelled binary decision",
  "absentClassPolicy": "null for a zero denominator; balanced accuracy requires both observed classes",
  "cases": [
    {
      "id": "rare_failure_rule",
      "matrix": [
        [
          9801,
          99
        ],
        [
          10,
          90
        ]
      ],
      "counts": {
        "tn": 9801,
        "fp": 99,
        "fn": 10,
        "tp": 90
      },
      "exact": {
        "recall": "9/10",
        "specificity": "99/100",
        "fpr": "1/100",
        "precision": "10/21",
        "negative_predictive_value": "9801/9811",
        "accuracy": "9891/10000",
        "balanced_accuracy": "189/200",
        "adjusted_balanced_accuracy": "89/100"
      },
      "decimal": {
        "recall": 0.9,
        "specificity": 0.99,
        "fpr": 0.01,
        "precision": 0.47619047619047616,
        "negative_predictive_value": 0.998980735908674,
        "accuracy": 0.9891,
        "balanced_accuracy": 0.945,
        "adjusted_balanced_accuracy": 0.89
      }
    },
    {
      "id": "never_alert",
      "matrix": [
        [
          9900,
          0
        ],
        [
          100,
          0
        ]
      ],
      "counts": {
        "tn": 9900,
        "fp": 0,
        "fn": 100,
        "tp": 0
      },
      "exact": {
        "recall": "0",
        "specificity": "1",
        "fpr": "0",
        "precision": null,
        "negative_predictive_value": "99/100",
        "accuracy": "99/100",
        "balanced_accuracy": "1/2",
        "adjusted_balanced_accuracy": "0"
      },
      "decimal": {
        "recall": 0.0,
        "specificity": 1.0,
        "fpr": 0.0,
        "precision": null,
        "negative_predictive_value": 0.99,
        "accuracy": 0.99,
        "balanced_accuracy": 0.5,
        "adjusted_balanced_accuracy": 0.0
      }
    },
    {
      "id": "no_observed_negatives",
      "matrix": [
        [
          0,
          0
        ],
        [
          10,
          90
        ]
      ],
      "counts": {
        "tn": 0,
        "fp": 0,
        "fn": 10,
        "tp": 90
      },
      "exact": {
        "recall": "9/10",
        "specificity": null,
        "fpr": null,
        "precision": "1",
        "negative_predictive_value": "0",
        "accuracy": "9/10",
        "balanced_accuracy": null,
        "adjusted_balanced_accuracy": null
      },
      "decimal": {
        "recall": 0.9,
        "specificity": null,
        "fpr": null,
        "precision": 1.0,
        "negative_predictive_value": 0.0,
        "accuracy": 0.9,
        "balanced_accuracy": null,
        "adjusted_balanced_accuracy": null
      }
    },
    {
      "id": "no_observed_positives",
      "matrix": [
        [
          9801,
          99
        ],
        [
          0,
          0
        ]
      ],
      "counts": {
        "tn": 9801,
        "fp": 99,
        "fn": 0,
        "tp": 0
      },
      "exact": {
        "recall": null,
        "specificity": "99/100",
        "fpr": "1/100",
        "precision": "0",
        "negative_predictive_value": "1",
        "accuracy": "99/100",
        "balanced_accuracy": null,
        "adjusted_balanced_accuracy": null
      },
      "decimal": {
        "recall": null,
        "specificity": 0.99,
        "fpr": 0.01,
        "precision": 0.0,
        "negative_predictive_value": 1.0,
        "accuracy": 0.99,
        "balanced_accuracy": null,
        "adjusted_balanced_accuracy": null
      }
    },
    {
      "id": "empty",
      "matrix": [
        [
          0,
          0
        ],
        [
          0,
          0
        ]
      ],
      "counts": {
        "tn": 0,
        "fp": 0,
        "fn": 0,
        "tp": 0
      },
      "exact": {
        "recall": null,
        "specificity": null,
        "fpr": null,
        "precision": null,
        "negative_predictive_value": null,
        "accuracy": null,
        "balanced_accuracy": null,
        "adjusted_balanced_accuracy": null
      },
      "decimal": {
        "recall": null,
        "specificity": null,
        "fpr": null,
        "precision": null,
        "negative_predictive_value": null,
        "accuracy": null,
        "balanced_accuracy": null,
        "adjusted_balanced_accuracy": null
      }
    },
    {
      "id": "perfect",
      "matrix": [
        [
          10,
          0
        ],
        [
          0,
          10
        ]
      ],
      "counts": {
        "tn": 10,
        "fp": 0,
        "fn": 0,
        "tp": 10
      },
      "exact": {
        "recall": "1",
        "specificity": "1",
        "fpr": "0",
        "precision": "1",
        "negative_predictive_value": "1",
        "accuracy": "1",
        "balanced_accuracy": "1",
        "adjusted_balanced_accuracy": "1"
      },
      "decimal": {
        "recall": 1.0,
        "specificity": 1.0,
        "fpr": 0.0,
        "precision": 1.0,
        "negative_predictive_value": 1.0,
        "accuracy": 1.0,
        "balanced_accuracy": 1.0,
        "adjusted_balanced_accuracy": 1.0
      }
    },
    {
      "id": "inverted",
      "matrix": [
        [
          0,
          10
        ],
        [
          10,
          0
        ]
      ],
      "counts": {
        "tn": 0,
        "fp": 10,
        "fn": 10,
        "tp": 0
      },
      "exact": {
        "recall": "0",
        "specificity": "0",
        "fpr": "1",
        "precision": "0",
        "negative_predictive_value": "0",
        "accuracy": "0",
        "balanced_accuracy": "0",
        "adjusted_balanced_accuracy": "-1"
      },
      "decimal": {
        "recall": 0.0,
        "specificity": 0.0,
        "fpr": 1.0,
        "precision": 0.0,
        "negative_predictive_value": 0.0,
        "accuracy": 0.0,
        "balanced_accuracy": 0.0,
        "adjusted_balanced_accuracy": -1.0
      }
    }
  ]
}
