-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdraw.py
46 lines (36 loc) · 1.57 KB
/
draw.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
42
43
44
45
46
import matplotlib.pylab as plt
def draw(accuracies):
training = accuracies[0]
testing = accuracies[1]
training_around1_accuracy = accuracies[2]
testing_around1_accuracy = accuracies[3]
training_around2_accuracy = accuracies[4]
testing_around2_accuracy = accuracies[5]
ks =[ i for i in range(len(training))]
f1 = plt.figure(1)
plt.title('accuracy')
# plt.xticks(ks)
plt.ylim([0, 1])
plt.plot(ks,training, color='red',label='training',alpha=0.5)
# plt.plot(ks,validation, color='blue',label='validation',alpha=0.5)
plt.plot(ks,testing, color='green',label='testing',alpha=0.5)
plt.legend(loc='upper right')
ks = [i for i in range(len(training))]
f2 = plt.figure(2)
plt.title('around 1 accuracy')
# plt.xticks(ks)
plt.ylim([0, 1])
plt.plot(ks, training_around1_accuracy, color='red', label='training_around1_accuracy', alpha=0.5)
# plt.plot(ks,validation, color='blue',label='validation',alpha=0.5)
plt.plot(ks, testing_around1_accuracy, color='green', label='testing_around1_accuracy', alpha=0.5)
plt.legend(loc='upper right')
ks = [i for i in range(len(training))]
f3 = plt.figure(3)
plt.title('around 2 accuracy')
# plt.xticks(ks)
plt.ylim([0, 1])
plt.plot(ks, training_around2_accuracy, color='red', label='training_around2_accuracy', alpha=0.5)
# plt.plot(ks,validation, color='blue',label='validation',alpha=0.5)
plt.plot(ks, testing_around2_accuracy, color='green', label='testing_around2_accuracy', alpha=0.5)
plt.legend(loc='upper right')
plt.show()