input_size - This input represents the number of predictor features we are using in the model.The model we have defined will take three inputs: Revenue data as used in this article is publically available for every public company through their legally required corporate filings, the data can be sourced here. The data is available, along with the code, on my Github here. The data is characteristic of any seasonal time-series data, with certain repeated patterns. As such, we are essentially dealing with a time series forecasting problem. These seasonal trends can be very tricky for a traditional model to pick up on but LSTMs have shown themselves to handle this type of problem quite well! The model itself will be quite basic we will use the previous sixteen quarterly values to predict the following eight quarterly values. This is characteristic of many retailers, from large companies to your local Sunday market, whose sales pick up due to the Christmas season. For example, a company's sales may spike around the holiday season each year. Many time series exhibit seasonal trends as we can see on the graph above. In this post, I will apply a long short-term memory (LSTM) network using PyTorch to forecast a time-series multiple periods into the future.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |