Data Science Asked on April 30, 2021
I would like to create an LSTM
using Keas
, which takes as input a multivariate time series.
Following that example, we can see how the label hasbeen shaped:
y_train = features.iloc[start:end][[1]]
I have tried with: y_train = train_data.iloc[:, -1]
Later, I have passed that label to timeseries_dataset_from_array()
:
dataset_train = keras.preprocessing.timeseries_dataset_from_array(
x_train,
y_train,
sequence_length=sequence_length,
batch_size=batch_size,
)
Which returns a wrong target’s shape (64, )
, where the correct shape should be (64, 1)
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP