XGBoost Time Series Diff Feature

  Kiến thức lập trình

I have a question, can someone help?

Let’s suppose I have day 1,2,3,4 and want to predict day 5:

Features = Weekday, Diff
Target = Value

Weekday | Diff | Value
1 NaN 20
2 40 60
3 20 80
4 20 100
5 ? ?

When I train my model using diff() as feature, it really enhances the results. But what is the purpose of using it, if I can’t use it to predict future steps?

Is there a way I can use it as my input? Otherwise I don’t see the purpose of using diff in my training

I would be very glad if someone can explain me and give me some ideas to deal with it.

I tried using the diff from last two days as an approximation to fill in day 5, but it really didn’t help since my data has a lot of peaks and downs

New contributor

Vitor Xavier is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT