Confidence intervals
Accuracy confidence interval
Implemented
confidence.accuracy_ciDefinition
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
import evalsuite as es
es.accuracy_ci(y_true, y_pred, method="wilson")References
- Wilson EB. Probable inference, the law of succession, and statistical inference. JASA. 1927;22:209-212.