如何在培训数据上获得预测结果?
我有一个长期的短期内存(LSTM)深神经网络代码,使变量的多变量预测分为培训和测试集:数据库
from keras.layers import Dense, LSTM, Dropout
model=Sequential()
model.add(LSTM(units=50,return_sequences=True, input_shape=(1,5)))
model.add(Dropout(0.2))
model.add(LSTM(units=50))
model.add(Dropout(0.2))
model.add(Dense(1))
model.compile(optimizer='adam', loss='mean_squared_error')
model.fit(X_train_shape,y_train, epochs=100, batch_size=48)
分为培训和测试集。
作为最终结果,模型为我提供了测试数据集的预测结果。 我如何也能获得培训数据的预测结果?
I have a Long Short-Term Memory (LSTM) deep neural network code that makes multivariate forecasts of a variable, The database is split into a training and test set:
from keras.layers import Dense, LSTM, Dropout
model=Sequential()
model.add(LSTM(units=50,return_sequences=True, input_shape=(1,5)))
model.add(Dropout(0.2))
model.add(LSTM(units=50))
model.add(Dropout(0.2))
model.add(Dense(1))
model.compile(optimizer='adam', loss='mean_squared_error')
model.fit(X_train_shape,y_train, epochs=100, batch_size=48)
The database is split into a training and test set.
As final results the model gives me the forecast results on the test data set.
How can I get the prediction results of the training data as well?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论