-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbasic_statistics.py
More file actions
28 lines (20 loc) · 838 Bytes
/
basic_statistics.py
File metadata and controls
28 lines (20 loc) · 838 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
import pandas as pd
import csv
from collections import defaultdict
import argparse
parser = argparse.ArgumentParser(description='UQV aggregation script',
usage='Create new UQV scores',
epilog='ROBUST version')
parser.add_argument('results', metavar='Aggregate_Results_File', default=None, help='path to agg res file')
def read_file(file):
df = pd.read_table(file, delim_whitespace=True, index_col=0, names=['score'])
# print(df.head())
print('Mean : {:0.4f}'.format(float(df.mean(axis=0))))
print('Var : {:0.4f}'.format(float(df.var(0))))
print('STD : {:0.4f}'.format(float(df.std(0))))
def main(args: parser):
results_file = args.results
read_file(results_file)
if __name__ == '__main__':
args = parser.parse_args()
main(args)