{
  "id": 287533,
  "title": "Time Series Modeling - Starter Notebooks",
  "url": "/competitions/g-research-crypto-forecasting/discussion/287533",
  "author_name": "",
  "post_date": "2021-11-14T13:43:46.334368500Z",
  "votes": 10,
  "comment_count": 1,
  "views": 0,
  "content": "<p>'</p>\n<p>Hi Guys, </p>\n<p>I extended \"[G-Research] Parallel LSTM training\" by DEVOLNYX [1], and prepared some sequence-based models starter notebooks.</p>\n<p>The Basic idea of those models is to re-arrange the data into windows of sequences, and labels. <br>\nWe basically create a sliding window that builds sequences and labels. So we have sequences of <code>WINDOW_SIZE</code> minutes, that will use to predict the next 15 minutes (from the competition tutorial).<br>\nBecause of the nature of this competition, we will implement the idea of using the parallel sequence model branches [This is where DEVOLNYX's great notebooks come in]. One branch for each asset then uses the representation learned to output a vector of targets for each timestep.</p>\n<hr>\n<p><strong>Summarizing the framework:</strong></p>\n<ul>\n<li>Fill gaps in the training set like is described in the competition tutorial notebook.</li>\n<li>Use <code>TimeseriesGenerator</code> generator class to build the dataset.</li>\n<li>Build the model structure:<ul>\n<li>Lambda layer needed for assets separation;</li>\n<li>Masking layer. Generated records (filled gaps) have zeros as features values, so they are not used in the computations.</li>\n<li>Our sequence model architecture [For example LSTM]</li>\n<li>Concatenation layer</li>\n<li>Dense layer</li></ul></li>\n</ul>\n<hr>\n<p><strong>The Notebooks:</strong></p>\n<ul>\n<li><a href=\"https://www.kaggle.com/yamqwe/time-series-modeling-lstm\" target=\"_blank\">LSTM</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/time-series-modeling-wavenet\" target=\"_blank\">WaveNet</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer\" target=\"_blank\">Multivariate Time Series Transformer</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/crypto-forecasting-n-beats\" target=\"_blank\">N-BEATS</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/probabilistic-forecasting-deepar/\" target=\"_blank\">DeepAR</a></li>\n</ul>\n<hr>\n<p>I used 1 epoch to train the weights since we are all a bit tight on compute time in this competition. There is much room for improvements, for example, different hyperparameters, more epochs, augmentations, different models, more data…</p>\n<p>[1] The original notebook can be found <a href=\"https://www.kaggle.com/vmuzhichenko/g-research-parallel-lstm-training\" target=\"_blank\">here</a></p>\n<p>Hope it helps fellow Kagglers!<br>\nHappy Kaggling!</p>",
  "messages": [
    {
      "id": "1582044",
      "postDate": "11/14/2021 13:43:46",
      "content": "<p>'</p>\n<p>Hi Guys, </p>\n<p>I extended \"[G-Research] Parallel LSTM training\" by DEVOLNYX [1], and prepared some sequence-based models starter notebooks.</p>\n<p>The Basic idea of those models is to re-arrange the data into windows of sequences, and labels. <br>\nWe basically create a sliding window that builds sequences and labels. So we have sequences of <code>WINDOW_SIZE</code> minutes, that will use to predict the next 15 minutes (from the competition tutorial).<br>\nBecause of the nature of this competition, we will implement the idea of using the parallel sequence model branches [This is where DEVOLNYX's great notebooks come in]. One branch for each asset then uses the representation learned to output a vector of targets for each timestep.</p>\n<hr>\n<p><strong>Summarizing the framework:</strong></p>\n<ul>\n<li>Fill gaps in the training set like is described in the competition tutorial notebook.</li>\n<li>Use <code>TimeseriesGenerator</code> generator class to build the dataset.</li>\n<li>Build the model structure:<ul>\n<li>Lambda layer needed for assets separation;</li>\n<li>Masking layer. Generated records (filled gaps) have zeros as features values, so they are not used in the computations.</li>\n<li>Our sequence model architecture [For example LSTM]</li>\n<li>Concatenation layer</li>\n<li>Dense layer</li></ul></li>\n</ul>\n<hr>\n<p><strong>The Notebooks:</strong></p>\n<ul>\n<li><a href=\"https://www.kaggle.com/yamqwe/time-series-modeling-lstm\" target=\"_blank\">LSTM</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/time-series-modeling-wavenet\" target=\"_blank\">WaveNet</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer\" target=\"_blank\">Multivariate Time Series Transformer</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/crypto-forecasting-n-beats\" target=\"_blank\">N-BEATS</a></li>\n<li><a href=\"https://www.kaggle.com/yamqwe/probabilistic-forecasting-deepar/\" target=\"_blank\">DeepAR</a></li>\n</ul>\n<hr>\n<p>I used 1 epoch to train the weights since we are all a bit tight on compute time in this competition. There is much room for improvements, for example, different hyperparameters, more epochs, augmentations, different models, more data…</p>\n<p>[1] The original notebook can be found <a href=\"https://www.kaggle.com/vmuzhichenko/g-research-parallel-lstm-training\" target=\"_blank\">here</a></p>\n<p>Hope it helps fellow Kagglers!<br>\nHappy Kaggling!</p>",
      "rawMarkdown": "'\n\nHi Guys, \n\nI extended \"[G-Research] Parallel LSTM training\" by DEVOLNYX [1], and prepared some sequence-based models starter notebooks.\n\nThe Basic idea of those models is to re-arrange the data into windows of sequences, and labels. \nWe basically create a sliding window that builds sequences and labels. So we have sequences of `WINDOW_SIZE` minutes, that will use to predict the next 15 minutes (from the competition tutorial).\nBecause of the nature of this competition, we will implement the idea of using the parallel sequence model branches [This is where DEVOLNYX's great notebooks come in]. One branch for each asset then uses the representation learned to output a vector of targets for each timestep.\n____\n**Summarizing the framework:**\n\n* Fill gaps in the training set like is described in the competition tutorial notebook.\n* Use `TimeseriesGenerator` generator class to build the dataset.\n* Build the model structure:\n    - Lambda layer needed for assets separation;\n    - Masking layer. Generated records (filled gaps) have zeros as features values, so they are not used in the computations.\n    - Our sequence model architecture [For example LSTM]\n    - Concatenation layer\n    - Dense layer\n____\n**The Notebooks:**\n- [LSTM](https://www.kaggle.com/yamqwe/time-series-modeling-lstm)\n- [WaveNet](https://www.kaggle.com/yamqwe/time-series-modeling-wavenet)\n- [Multivariate Time Series Transformer](https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer)\n- [N-BEATS](https://www.kaggle.com/yamqwe/crypto-forecasting-n-beats)\n- [DeepAR](https://www.kaggle.com/yamqwe/probabilistic-forecasting-deepar/)\n____\n\nI used 1 epoch to train the weights since we are all a bit tight on compute time in this competition. There is much room for improvements, for example, different hyperparameters, more epochs, augmentations, different models, more data…\n\n[1] The original notebook can be found [here](https://www.kaggle.com/vmuzhichenko/g-research-parallel-lstm-training)\n\nHope it helps fellow Kagglers!\nHappy Kaggling!",
      "votes": null
    },
    {
      "id": "1630983",
      "postDate": "12/27/2021 22:52:05",
      "content": "<p>404 - <a href=\"https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer\" target=\"_blank\">https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer</a></p>",
      "rawMarkdown": "404 - https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1630983,
      "author_name": "vladimircape",
      "author_url": "",
      "post_date": "12/27/2021 22:52:05",
      "content": "<p>404 - <a href=\"https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer\" target=\"_blank\">https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1582044": "'\n\nHi Guys, \n\nI extended \"[G-Research] Parallel LSTM training\" by DEVOLNYX [1], and prepared some sequence-based models starter notebooks.\n\nThe Basic idea of those models is to re-arrange the data into windows of sequences, and labels. \nWe basically create a sliding window that builds sequences and labels. So we have sequences of `WINDOW_SIZE` minutes, that will use to predict the next 15 minutes (from the competition tutorial).\nBecause of the nature of this competition, we will implement the idea of using the parallel sequence model branches [This is where DEVOLNYX's great notebooks come in]. One branch for each asset then uses the representation learned to output a vector of targets for each timestep.\n____\n**Summarizing the framework:**\n\n* Fill gaps in the training set like is described in the competition tutorial notebook.\n* Use `TimeseriesGenerator` generator class to build the dataset.\n* Build the model structure:\n    - Lambda layer needed for assets separation;\n    - Masking layer. Generated records (filled gaps) have zeros as features values, so they are not used in the computations.\n    - Our sequence model architecture [For example LSTM]\n    - Concatenation layer\n    - Dense layer\n____\n**The Notebooks:**\n- [LSTM](https://www.kaggle.com/yamqwe/time-series-modeling-lstm)\n- [WaveNet](https://www.kaggle.com/yamqwe/time-series-modeling-wavenet)\n- [Multivariate Time Series Transformer](https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer)\n- [N-BEATS](https://www.kaggle.com/yamqwe/crypto-forecasting-n-beats)\n- [DeepAR](https://www.kaggle.com/yamqwe/probabilistic-forecasting-deepar/)\n____\n\nI used 1 epoch to train the weights since we are all a bit tight on compute time in this competition. There is much room for improvements, for example, different hyperparameters, more epochs, augmentations, different models, more data…\n\n[1] The original notebook can be found [here](https://www.kaggle.com/vmuzhichenko/g-research-parallel-lstm-training)\n\nHope it helps fellow Kagglers!\nHappy Kaggling!",
    "1630983": "404 - https://www.kaggle.com/yamqwe/the-multivariate-time-series-transformer"
  },
  "source": "meta"
}