-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (26 loc) · 978 Bytes
/
main.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
"""Main function"""
import numpy as np
import utils
import json
import argparse
import datetime
import time
import config
from experiment import experiment
from relation import populate
parser = argparse.ArgumentParser()
parser.add_argument('--run_experiments', default=False, action='store_true')
parser.add_argument('--run_analysis', default=False, action='store_true')
parser.add_argument('--cpu', default=1, type=int)
parser.add_argument('--log', default=False, action='store_true')
parser.add_argument('--dataset', default=None)
parser.add_argument('--nosave', default=False, action='store_true')
parser.add_argument('--alpha', default=0.05, type=float)
args = parser.parse_args()
# run experiments on datasets
if args.run_experiments:
datasets = [utils.get_dataset(args.dataset)] if args.dataset is not None else config.datasets
experiment(datasets, args.log, args.cpu, args.nosave)
# run analysis on results
if args.run_analysis:
populate([args.alpha])