All problems
SBA Demand Estimate
Problem
Compute the Syntetos-Boylan approximation to intermittent demand: (1 - alpha / 2) * size / interval.
Return 0.0 when the interval is not positive.
Hint
SBA is Croston divided by the interval with a bias-correction factor (1 - alpha / 2).
Test cases
case 1
in: [5,2,0.2]
expected: 2.25
case 2
in: [10,4,0.5]
expected: 1.875
case 3
in: [3,0,0.1]
expected: 0
case 4
in: [2,1,1]
expected: 1
Starter codePython
def sba_demand_estimate(size, interval, alpha):
# Your code here
pass4 test cases · run your code against them in the editor