-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcode.py
More file actions
47 lines (33 loc) · 1.52 KB
/
code.py
File metadata and controls
47 lines (33 loc) · 1.52 KB
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
import matplotlib.pyplot as plt
import matplotlib.axes as ax
plt.gcf().subplots_adjust(bottom=0.25)
plt.title("Accuracy Comparison")
plt.tick_params(axis='x',labelbottom=False,direction="in")
#ax.set_yticks([1426,3324,3604,4933,5644])
'''
for xx in range(10,100,10):
ax.Axes.axhline(plt.gca(),y=xx)
'''
plt.ylabel("Accuracy(%)")
plt.ylim(0,100)
plt.xlim(0,6000)
plt.plot([1426,3324,3604,4933,5644], [47.16,46.15,67.5,68,70], 'b', label='line 1', linewidth=1)
plt.plot([1426,3324,3604,4933,5644], [58.19,59.87,73,76.5,78], 'g', label='line 1', linewidth=1)
plt.plot([1426,3324,3604,4933,5644], [67.89,59.87,58,69,74.5], 'r', label='line 1', linewidth=1)
plt.plot([3604,4933,5644], [65.5,73,77.5], 'y', label='line 1', linewidth=1)
plt.plot([1426,3324,3604,4933,5644], [47.16,46.15,67.5,68,70], 'g.', label='line 1', linewidth=1)
plt.plot([1426,3324,3604,4933,5644], [58.19,59.87,73,76.5,78], 'bo', label='line 1', linewidth=1)
plt.plot([1426,3324,3604,4933,5644], [67.89,59.87,58,69,74.5], 'y^', label='line 1', linewidth=1)
plt.plot([3604,4933,5644], [65.5,73,77.5], 'rp', label='line 1', linewidth=1)
columns = (1426,3324,3604,4933,5644)
rows = ["MNB","Linear SVC","RBF SVC","CNN LSTM"]
cell_text=[]
cell_text.append([47.16,46.15,67.5,68,70])
cell_text.append([58.19,59.87,73,76.5,78])
cell_text.append([67.89,59.87,58,69,74.5])
cell_text.append(['','',65.5,73,77.5])
the_table = plt.table(cellText=cell_text,
rowLabels=rows,
colLabels=columns,
loc='bottom')
plt.show()