-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path4_interpret_results.py
executable file
·94 lines (72 loc) · 2.62 KB
/
4_interpret_results.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
import os
import pandas as pd
import matplotlib.pyplot as plt
import scipy
plt.style.use('seaborn')
exportFolder = '/home/jean-pierre/ownCloud/phd/experiments_2023'
curdir = os.getcwd()
files = [
os.path.join(curdir,'resultsAll_20201117_3SamsungGalaxyA5.ods'),
os.path.join(curdir,'resultsAll_20201119_3pi4.ods'),
os.path.join(curdir,'resultsAll_20201126_4pi4_c5.ods'),
os.path.join(curdir,'resultsAll_20201303_1pi4_sampled.ods'),
os.path.join(curdir,'resultsAll_2022_randomWoodImages.ods'),
os.path.join(curdir,'resultsAll_20191125_Allier1.ods')
]
for file in files:
print(' ')
outputFile = os.path.join(exportFolder,(file.split('/')[-1]).split('.')[0]+'.png')
print(outputFile)
df = pd.read_excel(file)
#plt.figure(figsize=(8, 12), dpi=160)
df.plot.box(patch_artist=True)
plt.title(((file.split('/')[-1]).split('.')[0]).split('resultsAll_')[1])
plt.xlabel('Scenario')
plt.ylabel('mean Average Precision (mAP)')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.savefig(outputFile, dpi=400)
columnlist = df.columns.tolist()
for item in columnlist:
if item != 'jpgs':
kruskal = scipy.stats.kruskal(df["jpgs"],df[item])
if kruskal.pvalue < 0.05:
print('DIFFERENT '+str(item)+':')
print(kruskal)
df1 = pd.read_excel(os.path.join(curdir,'resultsAll_20201117_3SamsungGalaxyA5.ods'))
df2 = pd.read_excel(os.path.join(curdir,'resultsAll_20201119_3pi4.ods'))
df3 = pd.read_excel(os.path.join(curdir,'resultsAll_20201126_4pi4_c5.ods'))
df4 = pd.read_excel(os.path.join(curdir,'resultsAll_20201303_1pi4_sampled.ods'))
df5 = pd.read_excel(os.path.join(curdir,'resultsAll_2022_randomWoodImages.ods'))
df6 = pd.read_excel(os.path.join(curdir,'resultsAll_20191125_Allier1.ods'))
#dfall = pd.concat(df2)
#print(dfall)
dfall = pd.concat([df1,df2,df3,df4,df5,df6])
'''
count = 0
for file in files:
df = pd.read_excel(file)
print(df)
if count != 0:
dfall = pd.merge(df,dfmem)
dfmem = df
count = count + 1
'''
#print(dfall)
outputFile = os.path.join(exportFolder,'resultsAllCombined.png')
print(outputFile)
#plt.figure(figsize=(8, 12), dpi=160)
dfall.plot.box(patch_artist=True)
plt.title('resultsAllCombined')
plt.xlabel('Scenario')
plt.ylabel('mean Average Precision (mAP)')
plt.xticks(rotation=45, ha='right')
plt.tight_layout()
plt.savefig(outputFile, dpi=400)
columnlist = dfall.columns.tolist()
for item in columnlist:
if item != 'jpgs':
kruskal = scipy.stats.kruskal(dfall["jpgs"],dfall[item])
if kruskal.pvalue < 0.05:
print('DIFFERENT:')
print(kruskal)