-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patheval.py
27 lines (24 loc) · 915 Bytes
/
eval.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
import json
from utils import preprocess_all, preprocess_age_group, preprocess_vgroup
if __name__ == "__main__":
with open("config.json", "r") as config_file:
config = json.load(config_file)
n_motifs = config["n_motifs"]
task = config["task"]
subtask = config["subtask"]
storage_dir = config["storage_dir"]
motifs_dir = config["motifs_dir"]
sub_files = config["age_group"]
motif_len = config["motif_len"]
print(task, subtask)
if subtask == "all":
preprocess_all(task, storage_dir, motifs_dir, sub_files, motif_len, n_motifs)
elif subtask == "age_group":
preprocess_age_group(
task, storage_dir, motifs_dir, sub_files, motif_len, n_motifs
)
elif subtask == "visit_group":
preprocess_vgroup(task, storage_dir, motifs_dir, sub_files, motif_len, n_motifs)
else:
print("Error, wrong task")
exit()