2 basic doubts on time series
2 basic doubts on time series
Loading saved threads...
NeverGiveUp · External communityPost link
External question — Data Science Stack Exchange
Author: NeverGiveUp
Original post: https://datascience.stackexchange.com/questions/121433
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Suppose say, I have to predict the cost of stock market. I have previous data and I have made it into the following Structure :
(Xt-3,Xt-2,Xt-1)--->(Xt=Yt)
Now the order of the above data points if I use an LSTM model should be preserved which means the Day1, Day2 and Day3 should be in sequential order.
My doubt is I will be having different rows like this. Can I shuffle those for training while preserving the order within each row. Eg : Can I keep the row For 3 days of August before 3 days of July even though those 3 days will be given in sequential order. I am assuming we should as every models considers each data row as a separate training sample and adjusts its weights as per gradient descent so order should not matter even if we shuffle the rows. Am I right?
Second doubt : if I have trained my model till May 8, And I need to predict tomorrow (May 11) and my window length is 3 for LSTM
Should I predict May 9 and May 10 and then use May 8, may 9 and May 10 value to predict the next day or should I use actual values of May 9 and May 10. I read somewhere you need to retrain to make new forecast. But I dont think it's a compulsion. If I have trained my model till may 8 and then I give it the values of May 8 May 9 and May10 in sequential order, It should give me a forecast right?
Quote
Report
m13op22 · External communityPost link
External answer — Data Science Stack Exchange
Author: m13op22
Original post: https://datascience.stackexchange.com/a/121434
License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/
Adaptation: HTML converted to plain text; contact email addresses removed.
Regarding Doubt 1:
Yes, if you shuffle those for training the order within each row will be preserved. If you shuffle the rows, that's good, and the LSTM models will consider each row as a separate sample.
Regarding Doubt 2:
If you train a model up to May 8th, you can build it so that it outputs predictions for May 9th, May 10th, May 11th, etc. You can evaluate the predictions using the actual values for May 9th and 10th or however else you think is good.
Quote
Report
Post Reply
Quoted from Forex.com.bd-Editorial External answer — Data Science Stack Exchange Author: m13op22 Source score (net votes, not local likes): 1 Original post: https://datascience.stackexchange.com/a/121434 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Regarding Doubt 1: Yes, if you shuffle those for training the order within each row will be preserved. If you shuffle the rows, that's good, and the LSTM models will consider each row as a separate sample. Regarding Doubt 2: If you train a model up to May 8th, you can build it so that it outputs predictions for May 9th, May 10th, May 11th, etc. You can evaluate the predictions using the actual values for May 9th and 10th or however else you think is good.
Checking account access…