{
  "id": 448218,
  "title": "How to structure data for an LSTMs or other models",
  "url": "/competitions/child-mind-institute-detect-sleep-states/discussion/448218",
  "author_name": "",
  "post_date": "2023-10-18T18:35:45.600731600Z",
  "votes": 9,
  "comment_count": 1,
  "views": 0,
  "content": "<p>I was wondering which is the best way to structure data for an LSTM model or other variants. LSTMs input usually have shape: <code>(batch_size, sequence_length, input_size)</code>. </p>\n<p>Some people are using daily sequences, which have length of 17280 (86400s/5). These could be daily <code>enmo</code> or <code>anglez</code> data. </p>\n<p>Question that come to my mind are:</p>\n<ul>\n<li>Should we work with both 2 series at the same time? Input could be: <code>(batch_size, 2, 17280)</code></li>\n<li>Work only with <code>enmo</code> or <code>anglez</code> and reshape the data? Input could be: <code>(batch_size, 128, 135)</code>, like 128 non-overlapping slices of the 17280 univariate series (each of length 135).</li>\n<li>Other ways of structuring.</li>\n</ul>\n<p>I am intrigued about how people are dealing with the input series. I am all ears!</p>",
  "messages": [
    {
      "id": "2487768",
      "postDate": "10/18/2023 18:35:45",
      "content": "<p>I was wondering which is the best way to structure data for an LSTM model or other variants. LSTMs input usually have shape: <code>(batch_size, sequence_length, input_size)</code>. </p>\n<p>Some people are using daily sequences, which have length of 17280 (86400s/5). These could be daily <code>enmo</code> or <code>anglez</code> data. </p>\n<p>Question that come to my mind are:</p>\n<ul>\n<li>Should we work with both 2 series at the same time? Input could be: <code>(batch_size, 2, 17280)</code></li>\n<li>Work only with <code>enmo</code> or <code>anglez</code> and reshape the data? Input could be: <code>(batch_size, 128, 135)</code>, like 128 non-overlapping slices of the 17280 univariate series (each of length 135).</li>\n<li>Other ways of structuring.</li>\n</ul>\n<p>I am intrigued about how people are dealing with the input series. I am all ears!</p>",
      "rawMarkdown": "I was wondering which is the best way to structure data for an LSTM model or other variants. LSTMs input usually have shape: `(batch_size, sequence_length, input_size)`. \n\nSome people are using daily sequences, which have length of 17280 (86400s/5). These could be daily `enmo` or `anglez` data. \n\nQuestion that come to my mind are:\n- Should we work with both 2 series at the same time? Input could be: `(batch_size, 2, 17280)`\n- Work only with `enmo` or `anglez` and reshape the data? Input could be: `(batch_size, 128, 135)`, like 128 non-overlapping slices of the 17280 univariate series (each of length 135).\n- Other ways of structuring.\n\nI am intrigued about how people are dealing with the input series. I am all ears!",
      "votes": null
    },
    {
      "id": "2490440",
      "postDate": "10/20/2023 17:09:28",
      "content": "<p>I am using 3 days of data and like what have done in public notebook down sampling(down sample size of 12) and expanding the feature from [enmo, anglez] to [enmo_mean, enmo_max, enmo_min, enmo_median, enmo_std, anglez_mean, anglez_max, anglez_min, anglez_median, anglez_std]. <br>\nHence, my final shape is (batch_size, 3 * 17280 // down_sample_length, 2 * 5) = <strong>(batch_size, 4320, 10)</strong></p>",
      "rawMarkdown": "I am using 3 days of data and like what have done in public notebook down sampling(down sample size of 12) and expanding the feature from [enmo, anglez] to [enmo_mean, enmo_max, enmo_min, enmo_median, enmo_std, anglez_mean, anglez_max, anglez_min, anglez_median, anglez_std]. \nHence, my final shape is (batch_size, 3 * 17280 // down_sample_length, 2 * 5) = **(batch_size, 4320, 10)**",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2490440,
      "author_name": "yuchen2066",
      "author_url": "",
      "post_date": "10/20/2023 17:09:28",
      "content": "<p>I am using 3 days of data and like what have done in public notebook down sampling(down sample size of 12) and expanding the feature from [enmo, anglez] to [enmo_mean, enmo_max, enmo_min, enmo_median, enmo_std, anglez_mean, anglez_max, anglez_min, anglez_median, anglez_std]. <br>\nHence, my final shape is (batch_size, 3 * 17280 // down_sample_length, 2 * 5) = <strong>(batch_size, 4320, 10)</strong></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2487768": "I was wondering which is the best way to structure data for an LSTM model or other variants. LSTMs input usually have shape: `(batch_size, sequence_length, input_size)`. \n\nSome people are using daily sequences, which have length of 17280 (86400s/5). These could be daily `enmo` or `anglez` data. \n\nQuestion that come to my mind are:\n- Should we work with both 2 series at the same time? Input could be: `(batch_size, 2, 17280)`\n- Work only with `enmo` or `anglez` and reshape the data? Input could be: `(batch_size, 128, 135)`, like 128 non-overlapping slices of the 17280 univariate series (each of length 135).\n- Other ways of structuring.\n\nI am intrigued about how people are dealing with the input series. I am all ears!",
    "2490440": "I am using 3 days of data and like what have done in public notebook down sampling(down sample size of 12) and expanding the feature from [enmo, anglez] to [enmo_mean, enmo_max, enmo_min, enmo_median, enmo_std, anglez_mean, anglez_max, anglez_min, anglez_median, anglez_std]. \nHence, my final shape is (batch_size, 3 * 17280 // down_sample_length, 2 * 5) = **(batch_size, 4320, 10)**"
  },
  "source": "meta"
}