forked from cnktysz/HepTrkX-quantum
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplot_statistics.py
41 lines (35 loc) · 3 KB
/
plot_statistics.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import matplotlib.pyplot as plt
import numpy as np
loss = [0.177,0.142,0.167,0.155,0.134,0.129,0.141,0.135,0.138,0.132,0.144,0.119,0.136,0.138,0.132,0.119]
theta_learn = np.zeros((len(loss),11))
theta_learn[0,:] = [0.77499529, 2.07090782, 1.09957806, 3.70418821, 2.88605359, 3.57789129, 3.62954548, 5.07890288, 5.63452242, 0.14290447, 3.76538363]
theta_learn[1,:] = [0.75731441, 2.05578869, 1.0659562, 3.72981226, 2.90520988, 3.60065413, 3.60842417, 5.07374004, 5.61675849, 0.15407605, 3.69114975]
theta_learn[2,:] = [0.74548725, 2.03737306, 1.05891917, 3.74905094, 2.93463375, 3.55281462, 3.68233364, 5.02166597, 5.66837166, 0.17828593, 3.56752835]
theta_learn[3,:] = [0.74013422, 2.02704646, 1.08229708, 3.70883321, 2.91874261, 3.58177574, 3.65682197, 5.03689458, 5.62264848, 0.15803399, 3.49171186]
theta_learn[4,:] = [0.7097931, 1.95642497, 1.15088587, 3.696422, 2.91349962, 3.51729911, 3.64321917, 4.95829178, 5.64919989, 0.16617417, 3.36909504]
theta_learn[5,:] = [0.7100197, 1.94174516, 1.13714202, 3.64847126, 2.91967696, 3.53060617, 3.64318961, 4.92150032, 5.61737066, 0.14943197, 3.355164 ]
theta_learn[6,:] = [0.69669798, 1.94795428, 1.15108036, 3.64810933, 2.92184854, 3.50230322, 3.62864806, 4.89271747, 5.63019103, 0.17238103, 3.34411843]
theta_learn[7,:] = [0.65694238, 1.94412536, 1.13443678, 3.65063479, 2.8961296, 3.57757002, 3.57862362, 4.91818794, 5.63548228, 0.23243399, 3.30046059]
theta_learn[8,:] = [0.62672142, 1.95101488, 1.13323848, 3.7073345, 2.87384915, 3.60480515, 3.57908821, 4.89461004, 5.67504602, 0.24147931, 3.29105549]
theta_learn[9,:] = [0.65976782, 1.94455728, 1.13470088, 3.6772353, 2.91517395, 3.66948035, 3.58333781, 4.85754444, 5.68768922, 0.25594651, 3.22891789]
theta_learn[10,:] = [0.66858578, 1.96566165, 1.14672515, 3.66264307, 2.89721278, 3.68986142, 3.53124557, 4.84965124, 5.68728873, 0.25554846, 3.19540332]
theta_learn[11,:] = [0.65698457, 1.92645923, 1.1360605, 3.7033621, 2.85032457, 3.72421791, 3.5749918, 4.9237177, 5.68914371, 0.2819835, 3.19187462]
theta_learn[12,:] = [0.63156856, 1.90451888, 1.08928185, 3.71825378, 2.82993838, 3.70551775, 3.56783324, 4.92067531, 5.66827715, 0.25672447, 3.21581183]
theta_learn[13,:] = [0.64172315, 1.89862194, 1.07484384, 3.68005733, 2.78713967, 3.70150487, 3.54185579, 4.93087821, 5.72234157, 0.22580982, 3.18443019]
theta_learn[14,:] = [0.61863597, 1.86397921, 1.05429683, 3.6731616, 2.860473, 3.75458863, 3.59038228, 4.93172266, 5.69411592, 0.23789871, 3.16608147]
theta_learn[15,:] = [0.55161792, 1.85943047, 1.08140153, 3.63996665, 2.88102174, 3.79186661, 3.56057362, 4.89482735, 5.66435058, 0.22283012, 3.19929808]
every_epoch = 1
x = [i*every_epoch for i in range(len(loss))]
for i in range(len(theta_learn[0,:])):
plt.plot(x,theta_learn[:,i],marker='o',label=r'$\theta_{'+str(i)+'}$')
#plt.legend()
plt.xlabel('Update')
plt.ylabel(r'Angle (0 - 2$\pi$)')
#plt.show()
plt.savefig('png/statistics_angle.png')
plt.clf()
plt.plot(x,loss,marker='o')
plt.xlabel('Update')
plt.ylabel('Loss')
#plt.show()
plt.savefig('png/statistics_accuracy.png')