Commit f3f7fe03 authored by Shengpu Tang (tangsp)'s avatar Shengpu Tang (tangsp)
Browse files

fix all shallow models

parent f071e1bb
...@@ -161,7 +161,7 @@ class _Mimic3Reader(object): ...@@ -161,7 +161,7 @@ class _Mimic3Reader(object):
self.timestep = timestep self.timestep = timestep
start_time = time.time() start_time = time.time()
self.df_label = pd.read_csv(data_path + 'population/{}_{}h.csv'.format(task, duration)).rename(columns={'{}_LABEL'.format(task): 'LABEL'}) self.df_label = pd.read_csv(data_path + 'population/{}_{}h.csv'.format(task, duration)).rename(columns={'ID': 'ICUSTAY_ID', '{}_LABEL'.format(task): 'LABEL'})
self.df_subjects = pd.read_csv(data_path + 'prep/icustays_MV.csv').merge(self.df_label, on='ICUSTAY_ID', how='right') self.df_subjects = pd.read_csv(data_path + 'prep/icustays_MV.csv').merge(self.df_label, on='ICUSTAY_ID', how='right')
self.df_subject_label = self.df_subjects[['SUBJECT_ID', 'ICUSTAY_ID']] \ self.df_subject_label = self.df_subjects[['SUBJECT_ID', 'ICUSTAY_ID']] \
.merge(self.df_label, on='ICUSTAY_ID', how='right') \ .merge(self.df_label, on='ICUSTAY_ID', how='right') \
......
...@@ -6,7 +6,7 @@ mkdir -p output ...@@ -6,7 +6,7 @@ mkdir -p output
python run_shallow.py --outcome=mortality --T=48.0 --dt=1.0 --model_type=LR \ python run_shallow.py --outcome=mortality --T=48.0 --dt=1.0 --model_type=LR \
> >(tee 'log/outcome=mortality,T=48.0,dt=1.0,LR.out') \ > >(tee 'log/outcome=mortality,T=48.0,dt=1.0,LR.out') \
2> >(tee 'log/outcome=mortality,T=48.0,dt=1.0,LR.err' >&2) 2> >(tee 'log/outcome=mortality,T=48.0,dt=1.0,LR.err' >&2)
python run_shallow.py --outcome=mortality --T=48.0. --dt=1.0 --model_type=RF \ python run_shallow.py --outcome=mortality --T=48.0 --dt=1.0 --model_type=RF \
> >(tee 'log/outcome=mortality,T=48.0,dt=1.0,RF.out') \ > >(tee 'log/outcome=mortality,T=48.0,dt=1.0,RF.out') \
2> >(tee 'log/outcome=mortality,T=48.0,dt=1.0,RF.err' >&2) 2> >(tee 'log/outcome=mortality,T=48.0,dt=1.0,RF.err' >&2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment