There is a mismatch in the numerator of the Forecast Bias calculation shown in Chapter 4, page 80 of the book versus the forecast_bias implementation in ts_utils.py.
In ts_utils.py at line 105, forecast is calculated as this:
return ((y_true_sum - y_pred_sum) / y_true_sum) * 100.
Compare that to the book where the numerator is the negation of the code. I understand that both are valid definitions of forecast bias and just depends on your view, but I bring it up just in case you want consistency between the text and the code.
BTW, the metric values I get from running the notebook do not match the plots shown in the book, FYI.
There is a mismatch in the numerator of the Forecast Bias calculation shown in Chapter 4, page 80 of the book versus the
forecast_biasimplementation ints_utils.py.In
ts_utils.pyat line 105, forecast is calculated as this:return ((y_true_sum - y_pred_sum) / y_true_sum) * 100.Compare that to the book where the numerator is the negation of the code. I understand that both are valid definitions of forecast bias and just depends on your view, but I bring it up just in case you want consistency between the text and the code.
BTW, the metric values I get from running the notebook do not match the plots shown in the book, FYI.