All problems
Forecast Bias Correction
Problem
Estimate the additive forecast bias: mean(actuals) - mean(forecasts).
Empty input returns 0.0.
Hint
Adding this bias to future forecasts centers them on the actuals.
Test cases
case 1
in: [[10,12,14],[11,13,15]]
expected: 1
case 2
in: [[5,5],[5,5]]
expected: 0
case 3
in: [[10],[8]]
expected: -2
case 4
in: [[],[]]
expected: 0
Starter codePython
def bias_correction(forecasts, actuals):
# Your code here
pass4 test cases · run your code against them in the editor