首页 > 解决方案 > LSTM 预测罕见事件

问题描述

我有两列的数据框:日期,卷。我想按日期预测罕见事件的数量。你能给我一个例子或建议吗?谢谢大家

更新:我使用自动编码器来预测音量,它非常适合。但我想知道结果。有什么建议吗?

   # 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

此处的数据和结果:在此处 输入链接描述

标签: lstmrecurrent-neural-network

解决方案


推荐阅读