Skip to content

Inverting differenced values - wrong starting point #14

@Mkranj

Description

@Mkranj

In Chapter 5, there's a paragraph about reverting differenced values to the original scale, with the following code:

df['pred_foot_traffic'] = pd.Series()
df['pred_foot_traffic'][948:] = df['foot_traffic'].iloc[948] +
➥ pred_df['pred_AR'].cumsum()

However, df['foot_traffic'].iloc[948] is not the last point of training data, but the first point to predict, isn't it? So shouldn't the code actually use df['foot_traffic'].iloc[947] ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions