Skip to content
DeepForgeby svx
All problems
EasyTime Seriests-182

Forecast Value Added

Problem

Compute the value a forecast adds over a naive benchmark: naive_error - forecast_error.

Positive values mean the model beats the naive forecast; zero means it adds nothing.

Hint

This is the error gap in favor of the more sophisticated forecast.

Test cases

case 1
in: [10,7]
expected: 3
case 2
in: [5,5]
expected: 0
case 3
in: [4,9]
expected: -5
case 4
in: [0,0]
expected: 0
Starter codePython
def forecast_value_added(naive_error, forecast_error):
    # Your code here
    pass

4 test cases · run your code against them in the editor