title: LSTM predict for rare event
body: <p>I have data frame with 2 columns:Date, Volume. I want to predict volumn in rare event by Date. Can you give me an example or suggestion? Thank all</p>
  
  <p>Updated: I use Autoencoder for predict volume and it fits perfect. But i wonder the result. Any suggestion?</p>
  
  <pre><code>   # define model
       model = Sequential()
       model.add(LSTM(128, activation='relu', input_shape=(7,1), 
       return_sequences=True))
       model.add(LSTM(64, activation='relu', return_sequences=False))
       model.add(RepeatVector(1))
       model.add(LSTM(64, activation='relu', return_sequences=True))
       model.add(LSTM(128, activation='relu', return_sequences=True))
       model.add(TimeDistributed(Dense(1)))
       model.compile(optimizer='adam', loss='mse')
       model.summary()
       # fit model
       model.fit(x_train, x_train, epochs=100, batch_size=5, verbose=0
  </code></pre>
  
  <p>Data and result here:
  <a href="https://onedrive.live.com/Edit.aspx?resid=437553259C0D8140!279&amp;wd=cpe" rel="nofollow noreferrer">enter link description here</a></p>