Answers.Body: <p>For your first question, more details about your task would be helpful to effectively answer it, but, from what I can gather, I think the best way is for your input to the LSTM to be all of the features for all of the users of a given time step concatenated together with no zero. Again, you didn't specify the specific aspect of your problem so that really the best I can give you.</p>
  <p>As for your second question, I think you should do more analysis on your data before you come to the conclusion that you need a big, slow, and expensive neural network to solve your problem. Things you might want to do</p>
  <ol>
  <li>Try PCA and project your data into a space of two principal components to visualize its structure</li>
  <li>Try machine learning techniques like XGBoost, Kernel Machines, shallow neural networks, or clustering</li>
  </ol>
  <p>Generally, one's choice of a specific neural network should not be arbitrary. It should be deliberately chosen, based on hard evidence, to suit the structure of the data and its complexity.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-07-01T14:17:11.867Z
Answers.LastActivityDate: 2024-07-01T14:17:11.867Z
Answers.UserDisplayName: Jayson Meribe
Body: <p>ML newbie here, I have a time series dataset that looks like this:</p>
  <pre><code>   ID   Hour    P1      P2      P3      P4     Target
      1   1       95.0    36.11   75.33   19.0    0
      1   2       95.0    36.11   75.33   19.0    0
      1   3       99.0    36.11   86.00   22.0    1
  </code></pre>
  <p>It has the data of multiple users grouped by their IDs and the task is to predict the target label. I'm planning to convert it into a supervised learning task by appending shifted columns and use an LSTM to predict the target value for the next hour.</p>
  <p>My questions are:</p>
  <ol>
  <li>Since there are multiple users, would the prediction be impacted if no separation between users is made? And if so, how do I go about it? Do I just add rows of zeros between users equal to the number of shifts?</li>
  <li>Is using a time series approach recommended for this task or would a regression approach be more suited?</li>
  </ol>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-07-09T09:10:18.360Z
Comments.Text: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Comments.UserDisplayName: Community
Tags: <machine-learning><long-short-term-memory><time-series>
Title: How do I prepare a multi group time series dataset into a supervised learning one?
UserDisplayName: Snak
ThreadText: # How do I prepare a multi group time series dataset into a supervised learning one?
  
  (Asked by: username_0 on 2024-06-30)
  
  ML newbie here, I have a time series dataset that looks like this:
     ID   Hour    P1      P2      P3      P4     Target
      1   1       95.0    36.11   75.33   19.0    0
      1   2       95.0    36.11   75.33   19.0    0
      1   3       99.0    36.11   86.00   22.0    1
  
  It has the data of multiple users grouped by their IDs and the task is to predict the target label. I'm planning to convert it into a supervised learning task by appending shifted columns and use an LSTM to predict the target value for the next hour.
  My questions are:
  
  Since there are multiple users, would the prediction be impacted if no separation between users is made? And if so, how do I go about it? Do I just add rows of zeros between users equal to the number of shifts?
  Is using a time series approach recommended for this task or would a regression approach be more suited?
  
  **Tags:** machine-learning, long-short-term-memory, time-series
  > **Comments:**
  > **username_1**: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2024-07-01. Score: 1
  
  For your first question, more details about your task would be helpful to effectively answer it, but, from what I can gather, I think the best way is for your input to the LSTM to be all of the features for all of the users of a given time step concatenated together with no zero. Again, you didn't specify the specific aspect of your problem so that really the best I can give you.
  
  As for your second question, I think you should do more analysis on your data before you come to the conclusion that you need a big, slow, and expensive neural network to solve your problem. Things you might want to do
  
  1. Try PCA and project your data into a space of two principal components to visualize its structure
  2. Try machine learning techniques like XGBoost, Kernel Machines, shallow neural networks, or clustering
  
  Generally, one's choice of a specific neural network should not be arbitrary. It should be deliberately chosen, based on hard evidence, to suit the structure of the data and its complexity.
  
  
  ---
  
  