As per my understanding, you want to know why there is discrepancy in the output of the two functions.
The difference is coming due to the below two reasons:
- "infer" computes residuals based on how well the model fits the known data, while "forecast" predicts future values and compares them to actual data, reflecting predictive accuracy.
- Both functions use initial conditions differently; "infer" focuses on fitting within the known dataset, whereas "forecast" extends beyond the training data for predictions.
I hope it clears your doubt :)