-
Notifications
You must be signed in to change notification settings - Fork 9
/
reselection_multiple_round_visualization.py
57 lines (28 loc) · 1.1 KB
/
reselection_multiple_round_visualization.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
47
48
49
50
51
52
53
54
55
56
57
import numpy as np
import matplotlib.pyplot as plt
provider = np.load('data/reselection/distribution_provider_3.npy', allow_pickle = True)
requester = np.load('data/reselection/distribution_requester_3.npy', allow_pickle = True)
print(provider.shape)
plt.plot(provider[:, 0], 'r--o', markersize = 6, label = 'B.M')
plt.plot(provider[:, 1], 'g--^', markersize = 6, label = 'ESWM')
plt.hlines(0.5, xmin = 0, xmax = 100, linestyles = 'dashed')
plt.xticks(fontsize = 25)
plt.yticks(fontsize = 25)
plt.ylim([0, 1])
plt.xlabel('Round Index', fontsize = 25)
plt.ylabel('Participation Probability', fontsize = 25)
#plt.legend(loc = 'upper right', fontsize = 21)
plt.tight_layout()
plt.show()
plt.plot(requester[:, 0], 'r--o', markersize = 6, label = 'B.M')
plt.plot(requester[:, 1], 'g--^', markersize = 6, label = 'ESWM')
plt.hlines(0.5, xmin = 0, xmax = 100, linestyles = 'dashed')
plt.xticks(fontsize = 25)
plt.yticks(fontsize = 25)
plt.ylim([0, 1])
plt.xlabel('Round Index', fontsize = 25)
plt.ylabel('Participation Probability', fontsize = 25)
plt.legend(fontsize = 21)
plt.tight_layout()
plt.show()
#end