Skip to content
EvalSuite
Documentation menu

Confidence intervals

Accuracy confidence interval

Implementedconfidence.accuracy_ci

Definition

Confidence interval for accuracy as a binomial proportion of correct predictions (Wilson by default, or Clopper–Pearson / normal).

Formula

Wilson: (p̂ + z²/2n ± z√(p̂(1−p̂)/n + z²/4n²)) / (1 + z²/n)

Range: [0, 1]

Inputs and outputs

  • y_true: array of class labels
  • y_pred: array of predicted labels
  • level: confidence level (default 0.95)
  • method: wilson, clopper-pearson or normal

Returns: result object

Assumptions

No assumptions beyond valid, aligned inputs of the documented types.

Limitations

No metric-specific limitations are documented yet. Interpret the value alongside the task, data, and other metrics.

Python API

PythonSince v0.1.0
import evalsuite as es

es.accuracy_ci(y_true, y_pred, method="wilson")

References

  1. Wilson EB. Probable inference, the law of succession, and statistical inference. JASA. 1927;22:209-212.

Implementation status