All problems
Forecast Skill Score
Problem
Compute the skill score of a forecast relative to a reference: 1 - mse_forecast / mse_reference.
Return 0.0 when the reference MSE is zero. Positive values indicate the forecast beats the reference.
Hint
A perfect forecast scores 1, the reference scores 0.
Test cases
case 1
in: [4,16]
expected: 0.75
case 2
in: [16,16]
expected: 0
case 3
in: [20,16]
expected: -0.25
case 4
in: [0,16]
expected: 1
Starter codePython
def forecast_skill_score(mse_forecast, mse_reference):
# Your code here
pass4 test cases · run your code against them in the editor