-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmean.py
More file actions
26 lines (22 loc) · 741 Bytes
/
mean.py
File metadata and controls
26 lines (22 loc) · 741 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
"""Script for quick checking of a mean."""
import pandas as pd
import glovar
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('name',
type=str,
help='The name of the training run / experiment')
parser.add_argument('--take',
type=int,
default=200,
help='How many of the records to take')
args = parser.parse_args()
name = getattr(args, 'name')
take = getattr(args, 'take')
file_path = os.path.join(glovar.DATA_DIR, 'results.csv')
df = pd.read_csv(file_path)
df = df[df['experiment_name'] == name]
print('Number of records: %s' % len(df))
print('Taking %s of those...' % take)
print(df.iloc[0:take].mean())