I'll jump right to the structure of the data, and then I'll ask the question(s):
For a mass X ranging from 200 to 500 units, i have 100 seconds worth of 3 output_values. So, the first few rows of the data set look like:
t = 1, m = 200, out_1 = a, out_2 = b, out_3 = c t = 2, m = 200, out_1 = d, out_2 = e, out_3 = f ... t = 100, m = 200, out_1 = h, out_2 = i, out_3 = j t = 1, m = 201, out_1 = m, out_2 = n, out_3 = o etc.
This is how the distribution of the outputs for a mass = x for 100 seconds looks:
Now, my goal is to test wether an LTSM could predict 100s worth of output for every mass =
x, x + 1, ..., x + 100
x - 300, x - 299, ..., x - 1
In my case, should I also use the time as an input_variable?
I couldn't completely figure out a way to structure my data but "Multiple Parallel Input and Multi-Step Output" from https://machinelearningmastery.com/how-to-develop-lstm-models-for-time-series-forecasting/ seems to be right But I don't know how to prevent it from treating cases like:
... input from second 98, m = 200 input from second 99, m = 200 output from second 1, m = 201 output from second 2, m = 201 ...
which have no correlation and shouldn't be treated as an example.
How would you approach this problem?
I'm more than happy to get links to similar problems. I've played around with various approaches today, but the results weren't satisfactory.
Thank you all! Andreas
Update (what i tried) for seeing if the first 50 seconds of a mass can predict the next 50 seconds:
Using this notebook as a skeleton: https://www.kaggle.com/anshuljdhingra/time-series-data-analysis-using-lstm-tutorial/data
Pass the data to series_to_supervised(df.values, 50, 50) 50 input seconds, 50 output seconds
(size of data before 30100 x 4, size of data after 30001 x 400)
n_train_time = 150 * 100 (first 150 examples, times 100 seconds each)
size of train_X = (15000, 200) size of train_y = (15000, 200)
size of test_X = (15001, 200) size of test_y = (15001, 200)
train_X after reshape: (15000, 50, 4) test_X after reshape: (15000, 50, 4)
same simple LSTM model, with:
model.add(LSTM(100, input_shape=(train_X.shape1, train_X.shape)))
Should the batch_size pe equal to the time window i'm training on? How does my logic look?
Thanks again! Andreas