Open icarus3 opened 3 years ago
Hi! Any solution?
Sorry for not getting back to you earlier, I've been pre-occupied with a few other things. The error comes about because it expects a list of data points from the previous days and tomorrow_pred is only a value of a single day. It was completely my mistake in writing the code; I added that in there at the last second to show people that you need to make two prediction commands to get tomorrow's values, but never really tested it because I use a slightly different method to get them with the predictor in the actual agent.
To get the proper shape, it should be tomorrow_pred=model.predict(test_data[-seq_len:])
I just want to emphasize that you don't actually need the final few lines of code regarding tomorrow_pred to get your stuff up and running. The final server-deployable bot uses a much more straightforward method since it doesn't need to split the data up.
(Note, line numbers from following stack trace may not match the code that is checked in. I have couple of print statement added in my copy)