4034844b505f20da652a417e605d391eae8d6c0a,scripts/split_train_and_test.py,,,#,5

Before Change


import shutil
import argparse
import random
random.seed(47297)


parser = argparse.ArgumentParser(description="Split data into train and test sets.")
parser.add_argument("subjects_root_path", type=str, help="Directory containing subject sub-directories.")

After Change


args, _ = parser.parse_known_args()

testset = set()
with open("resources/testset.csv", "r") as test_set_file:
    for line in test_set_file:
        x, y = line.split(",")
        if int(y) == 1:
            testset.add(x)

def move_to_partition(patients, partition):
    if not os.path.exists(os.path.join(args.subjects_root_path, partition)):
        os.mkdir(os.path.join(args.subjects_root_path, partition))
    for patient in patients:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 13

Instances


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 4034844b505f20da652a417e605d391eae8d6c0a
Time: 2017-03-17
Author: harhro@gmail.com
File Name: scripts/split_train_and_test.py
Class Name:
Method Name:


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 4034844b505f20da652a417e605d391eae8d6c0a
Time: 2017-03-17
Author: harhro@gmail.com
File Name: scripts/split_train_and_test.py
Class Name:
Method Name:


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 5d353701dd56a1fc8abc15e4082e33b7bed2a241
Time: 2017-08-09
Author: harhro@gmail.com
File Name: mimic3models/split_train_val.py
Class Name:
Method Name:


Project Name: YerevaNN/mimic3-benchmarks
Commit Name: 7567cc646d258e40dde9790a28a9b264ccd494fb
Time: 2017-08-27
Author: harhro@gmail.com
File Name: mimic3models/split_train_val.py
Class Name:
Method Name: