Is that possible to develope 1dCNN-LSTM for regression to learn the time dependency
I have a dataset of D with the shape of (100000, 40). In this dataset, columns 1 to 30 corresponds to my static parameters and column 31 to 40 are the output at different time steps.
I have used the 1D-CNN model for regression purposes and to predict the output at different time steps. As, I have 10 different steps of my output, I have trained 10 different 1D-CNN models. I mean, my first model is between all 30 inputs and column 31. The 2nd model is between all 30 inputs and column 32 and so on.
model = Sequential()
model.add(Conv1D(64, 3, activation="relu", input_shape=(30, 1)))
model.add(Flatten())
model.add(Dense(64, activation="relu"))
model.add(Dense(1))
model.compile(loss="mse", optimizer="adam", metrics=['mean_squared_error'])
Is that possible for this case to train my dataset with CNN-LSTM model somehow my output learn the dependency of time at different steps or in another word is that possible to train a single CNN-LSTM model instead of making multiple separate models. My goal is to build a single model using my dataset to be able to recursively use the model and predict the output through time for my output.
To use the CNN-LSTM model someone suggests using the API function in Keras, and building a multi-input model (one input for the time series data and one for static data). But still I am not sure if it works for my case.
I have read in the literature that there are different types of CNN-LSTM models such as one-to-one, one-to-many, many-to-one, and many-to-many. I think for my case the one-to-many works as I am giving the initial state of my data (not a sequence), then it predicts the output at different time steps.
But I dont know first if this idea really works for my case or not??
from Recent Questions - Stack Overflow https://ift.tt/381HGR6
https://ift.tt/eA8V8J
Comments
Post a Comment