All problems
Drift Detection Threshold
Problem
Return the upper control limit mean + k * population_std for a reference sample, where population std divides the sum of squared deviations by n. Return 0.0 when the reference is empty.
Test cases
case 1
in: [[1,2,3,4,5],3]
expected: 7.242640687119286
case 2
in: [[5,5,5],2]
expected: 5
case 3
in: [[],2]
expected: 0
case 4
in: [[0,10],1]
expected: 10
Starter codePython
def drift_threshold(reference, k):
# Your code here
pass4 test cases · run your code against them in the editor