-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcalc_rate.py
More file actions
42 lines (32 loc) · 819 Bytes
/
calc_rate.py
File metadata and controls
42 lines (32 loc) · 819 Bytes
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
import csv
with open('./Batch_4350992_batch_results.csv', 'r') as f:
reader = csv.reader(f)
header = next(reader)
count = 0
correct = 0
for row in reader:
label = row[27].split('/')[-1].split('_')[0]
answer = row[28]
if label == answer:
correct += 1
count += 1
print(correct)
print(count)
print(correct/count)
print("####################")
with open('./Batch_4369243_batch_results.csv', 'r') as f:
reader = csv.reader(f)
header = next(reader)
count = 0
correct = 0
for row in reader:
# print(row[27])
# exit()
label = row[27].split('/')[-1].split('_')[0]
answer = row[29]
if label == answer:
correct += 1
count += 1
print(correct)
print(count)
print(correct/count)