| #!/usr/bin/env python3 | 
|   | 
| import collections | 
| import csv | 
| import glob | 
| import statistics | 
|   | 
| # type-values-aggregation-model[-epochs] | 
|   | 
| results = {} | 
|   | 
| for filename in glob.glob('design_*'): | 
|     with open(filename) as fp: | 
|         reader = csv.reader(fp, delimiter=' ') | 
|         for row in reader: | 
|             assert row[0] == 'RESULT' | 
|              | 
|             index = (row[1], int(row[2])) | 
|              | 
|             if index not in results: | 
|                 results[index] = [ [], [], [] ] | 
|              | 
|             for i in range(3): | 
|                 results[index][i].append(float(row[3+i])) | 
|   | 
|   | 
| results = collections.OrderedDict(sorted(results.items())) | 
|   | 
| last = None | 
| for i in results: | 
|     if last and last != i[0]: | 
|         print() | 
|         print() | 
|     last = i[0] | 
|      | 
|     print(i[0], i[1], end='') | 
|     for j in range(len(results[i])): | 
|         print('', statistics.mean(results[i][j]), statistics.stdev(results[i][j]), end='') | 
|     print() |