How to create input samples from pandas dataframe for a LSTM model?
问题 I'm trying to create a LSTM model that gives me binary output buy or not. I have data that is in the format of: [date_time, close, volume] , in millions of rows. I'm stuck at formatting the data as 3-D; Samples, Timesteps, features. I have used pandas to read the data. I want to format it so I can get 4000 samples with 400 timesteps each, and two features (close and volume). Can someone advise on how to do this? EDIT: I am using the TimeseriesGenerator as advised, but I am not sure how to