Basically, I'm trying to use one waveform (above) to predict another waveform (). enter image description here

And Here are my model structure:

model = Sequential()
model.add(LSTM(NUM_NEURONS, input_shape=(train_X.shape[1], train_X.shape[2]), return_sequences=True))
model.add(LSTM(NUM_NEURONS, input_shape=(train_X.shape[1], train_X.shape[2])))
adam = optimizers.adam(lr=LR, beta_1=0.9, beta_2=0.999, epsilon=None, decay=0.0, amsgrad=False)
model.compile(loss='mse', optimizer=adam)
early_stopping = EarlyStopping(monitor='val_loss', patience=PATIENCE)
model.fit(train_X, train_y, epochs=EPOCHES, batch_size=BATCH_SIZE, validation_data=(test_X, test_y), callbacks=[early_stopping, tbCallBack], verbose=2, shuffle=False)

The shape of train_X and train_y is (5019, 1, 1) (5019, 1).

However, the LSTM cannot provide an accurate prediction: enter image description here

Can anyone tell me which part I did wrong?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.