Step 1: Creation of lagged datasets |
Step 2: Split data into train and test with a 60:20:20 ratio using the stratification technique |
Step 3: Apply the persistence model by predicting the output value (Y) as a replica of the input value (X) |
Step 4: Calculate residuals |
Step 5: Model the training set residuals with a defined lag value, predict RE with the AR model, and defined window size ⋲ Z +  |
Step 6: Walk forward over time steps in the test dataset |
Step 7: Correct forecasts with the designed model of RE using the following equation: \(improved\;forecast=forecast+estimated\;\;error\) |
Step 8: Calculate metrics for the corrected forecasts and compare them with the forecasts without REM to observe the improvements |