confidence

imagepypelines.confidence(data, confidence=0.95)[source]
returns the confidence mean and deviation for the given
confidence interval
Parameters:
  • data (array-like) – data to find the confidence interval for, in machine learning applications, this is usually accuracy for K-fold cross validation
  • confidence (float) – confidence interval between 0-1, to find the desired mean and deviation for
Returns:

the mean for this distributions float: +/- deviation for this confidence interval

Return type:

float

Example

>>> import numpy as np
>>> import imagepypelines as ip
>>> # create sample test 'accuracies' from a normal distribution
>>> # mean accuracy is 75%, std is 10% for this example
>>> accuracies = np.random.normal(.75, .1, 1000)
>>> # get 95% confidence interval
>>> mean, error = ip.confidence(accuracies,.95)