7567cc646d258e40dde9790a28a9b264ccd494fb,mimic3models/split_train_val.py,,,#,5

Before Change


val_lines = [x for x in lines if x[:x.find("_")] in val_patients]
assert len(train_lines) + len(val_lines) == len(lines)

if not os.path.exists("data/%s/" % args.task):
    os.makedirs("data/%s/" % args.task)

with open("data/%s/train_listfile.csv" % args.task, "w") as train_listfile:
    if has_header:
        train_listfile.write(header)
    for line in train_lines:

After Change



val_patients = set()
with open("mimic3models/valset.csv", "r") as valset_file:
    for line in valset_file:
        x, y = line.split(",")
        if int(y) == 1:
            val_patients.add(x)

has_header = False
if args.task in ["phenotyping", "multitask"]:
    has_header = True
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 7

Instances


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:


Project Name: pantsbuild/pants
Commit Name: 9f236fd5795b60f8f75d77e20189dbeabc123814
Time: 2013-04-04
Author: benjy@foursquare.com
File Name: src/python/twitter/pants/tasks/java_compile.py
Class Name: JavaCompile
Method Name: execute_single_compilation


Project Name: pantsbuild/pants
Commit Name: 699600d95b2b30291b26b8051cc379c0452e8c25
Time: 2013-04-09
Author: markcc@foursquare.com
File Name: src/python/twitter/pants/tasks/java_compile.py
Class Name: JavaCompile
Method Name: execute_single_compilation


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: