get 1 year ago
parent 6e775ae4d9
commit 019a7f039a

@ -147,12 +147,17 @@ plt.show()
# 以x为基础实际数据滚动预测未来3天
# x = torch.from_numpy(df[-14:-4]).to(device)
# pred = model(x.reshape(-1,1,DAYS_FOR_TRAIN)).view(-1).detach().numpy()
x2 = np.array([227964890.1,220189256.2,220189256.2,220189256.2,220189256.2,220189256.2,220189256.2,220189256.2,220189256.2,220189256.2])
x2 = (x2 - min_value) / (max_value - min_value)
x2 = x2.reshape(-1,1,10)
print(x2)
x2 = torch.from_numpy(x2).type(torch.float32).to(device)
pred2 = model(x2)
# 反归一化
# pred = pred * (max_value - min_value) + min_value
# df = df * (max_value - min_value) + min_value
pred2 = pred2 * (max_value - min_value) + min_value
# print(pred)
# # 打印指标
# print(abs(pred - df[-3:]).mean() / df[-3:].mean())

@ -0,0 +1,81 @@
,real,pred
0,131564783.7,126795130.0
1,132766749.3,133054400.0
2,134627798.5,112079910.0
3,60036891.29,132175150.0
4,126875653.9,121984800.0
5,132766749.3,131850330.0
6,134627798.5,130741310.0
7,60036891.29,122185530.0
8,126875653.9,120376670.0
9,114563784.3,125502700.0
10,134627798.5,121764130.0
11,60036891.29,122379070.0
12,126875653.9,115178010.0
13,114563784.3,114463370.0
14,126771498.6,121226660.0
15,60036891.29,120667700.0
16,126875653.9,121843530.0
17,114563784.3,116627580.0
18,126771498.6,119159256.0
19,129509629.2,122724620.0
20,126875653.9,78751710.0
21,114563784.3,87139670.0
22,126771498.6,88614824.0
23,129509629.2,88520584.0
24,130495445.0,90823224.0
25,114563784.3,115206100.0
26,126771498.6,116118080.0
27,129509629.2,117057660.0
28,130495445.0,119815080.0
29,129748129.5,115494200.0
30,126771498.6,111689224.0
31,129509629.2,111429730.0
32,130495445.0,113834776.0
33,129748129.5,109861300.0
34,129071269.0,109465610.0
35,129509629.2,120339630.0
36,130495445.0,117088150.0
37,129748129.5,114501450.0
38,129071269.0,112723880.0
39,123990717.9,114411340.0
40,130495445.0,122938440.0
41,129748129.5,118429950.0
42,129071269.0,112962740.0
43,123990717.9,114078220.0
44,114689979.6,117691510.0
45,129748129.5,119786430.0
46,129071269.0,117264330.0
47,123990717.9,113728376.0
48,114689979.6,117083560.0
49,126030504.0,119878720.0
50,129071269.0,118120460.0
51,123990717.9,119194650.0
52,114689979.6,120066800.0
53,126030504.0,124281810.0
54,129439645.7,123197270.0
55,123990717.9,134707740.0
56,114689979.6,135240900.0
57,126030504.0,139490300.0
58,129439645.7,141228210.0
59,129974672.9,136469630.0
60,114689979.6,126996620.0
61,126030504.0,128940420.0
62,129439645.7,133013000.0
63,129974672.9,129035260.0
64,130081788.2,127547430.0
65,126030504.0,121989440.0
66,129439645.7,122925096.0
67,129974672.9,122987600.0
68,130081788.2,120426230.0
69,128397780.6,120251540.0
70,129439645.7,126157680.0
71,129974672.9,124618160.0
72,130081788.2,122500020.0
73,128397780.6,122199360.0
74,122509080.0,122623110.0
75,129974672.9,126170240.0
76,130081788.2,123900060.0
77,128397780.6,121184110.0
78,122509080.0,121777624.0
79,113050253.7,123061704.0
1 real pred
2 0 131564783.7 126795130.0
3 1 132766749.3 133054400.0
4 2 134627798.5 112079910.0
5 3 60036891.29 132175150.0
6 4 126875653.9 121984800.0
7 5 132766749.3 131850330.0
8 6 134627798.5 130741310.0
9 7 60036891.29 122185530.0
10 8 126875653.9 120376670.0
11 9 114563784.3 125502700.0
12 10 134627798.5 121764130.0
13 11 60036891.29 122379070.0
14 12 126875653.9 115178010.0
15 13 114563784.3 114463370.0
16 14 126771498.6 121226660.0
17 15 60036891.29 120667700.0
18 16 126875653.9 121843530.0
19 17 114563784.3 116627580.0
20 18 126771498.6 119159256.0
21 19 129509629.2 122724620.0
22 20 126875653.9 78751710.0
23 21 114563784.3 87139670.0
24 22 126771498.6 88614824.0
25 23 129509629.2 88520584.0
26 24 130495445.0 90823224.0
27 25 114563784.3 115206100.0
28 26 126771498.6 116118080.0
29 27 129509629.2 117057660.0
30 28 130495445.0 119815080.0
31 29 129748129.5 115494200.0
32 30 126771498.6 111689224.0
33 31 129509629.2 111429730.0
34 32 130495445.0 113834776.0
35 33 129748129.5 109861300.0
36 34 129071269.0 109465610.0
37 35 129509629.2 120339630.0
38 36 130495445.0 117088150.0
39 37 129748129.5 114501450.0
40 38 129071269.0 112723880.0
41 39 123990717.9 114411340.0
42 40 130495445.0 122938440.0
43 41 129748129.5 118429950.0
44 42 129071269.0 112962740.0
45 43 123990717.9 114078220.0
46 44 114689979.6 117691510.0
47 45 129748129.5 119786430.0
48 46 129071269.0 117264330.0
49 47 123990717.9 113728376.0
50 48 114689979.6 117083560.0
51 49 126030504.0 119878720.0
52 50 129071269.0 118120460.0
53 51 123990717.9 119194650.0
54 52 114689979.6 120066800.0
55 53 126030504.0 124281810.0
56 54 129439645.7 123197270.0
57 55 123990717.9 134707740.0
58 56 114689979.6 135240900.0
59 57 126030504.0 139490300.0
60 58 129439645.7 141228210.0
61 59 129974672.9 136469630.0
62 60 114689979.6 126996620.0
63 61 126030504.0 128940420.0
64 62 129439645.7 133013000.0
65 63 129974672.9 129035260.0
66 64 130081788.2 127547430.0
67 65 126030504.0 121989440.0
68 66 129439645.7 122925096.0
69 67 129974672.9 122987600.0
70 68 130081788.2 120426230.0
71 69 128397780.6 120251540.0
72 70 129439645.7 126157680.0
73 71 129974672.9 124618160.0
74 72 130081788.2 122500020.0
75 73 128397780.6 122199360.0
76 74 122509080.0 122623110.0
77 75 129974672.9 126170240.0
78 76 130081788.2 123900060.0
79 77 128397780.6 121184110.0
80 78 122509080.0 121777624.0
81 79 113050253.7 123061704.0
Loading…
Cancel
Save