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

Before Change


train_cnt = int(0.82 * len(patients)) // this will became 70% of all data
train_patients = set(patients[:train_cnt])
val_patients = set(patients[train_cnt:])
assert len(train_patients & val_patients) == 0

train_lines = [x for x in lines if x[:x.find("_")] in train_patients]
val_lines = [x for x in lines if x[:x.find("_")] in val_patients]
assert len(train_lines) + len(val_lines) == len(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: 3

Non-data size: 4

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: 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: PyMVPA/PyMVPA
Commit Name: 2efc3e954f1540ddc62cf729f9fc64ba26f29f80
Time: 2019-05-03
Author: debian@onerussian.com
File Name: mvpa2/tests/test_gnb.py
Class Name:
Method Name: test_gnb_sensitivities