# 此处整个数据集送入,送入样本数为x_train.shape[0]即训练数据的样本个数; 循环核时间展开步数定位5x_train = np.reshape(x_train,(x_train.shape[0],5,1))#print(x_train.shape)# 同理划分测试集数据for i in range(5, len(test_set)):x_test.append(test_set[i - 5:i, 0])y_test.appen...
数据测试: # 导入库import pandas as pdimport numpy as npimport matplotlib.pyplotfrom sklearn.preprocessing import MinMaxScalerfrom sklearn.metrics import mean_squared_errorfrom math import sqrtfrom keras.models import load_modelimport matplotlib.pyplot as plt# 解决中文显示问题plt.rcParams['font.sans-se...