Skip to content

Mismatch between ts_utils.py implementation of forecast_bias vs what is written in Chapter 4 of Book #40

Description

@beliu

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions