Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
MLD3
FIDDLE
Commits
f3f7fe03
Commit
f3f7fe03
authored
Aug 05, 2019
by
Shengpu Tang (tangsp)
Browse files
fix all shallow models
parent
f071e1bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
mimic3_experiments/3_ML_models/lib/data.py
View file @
f3f7fe03
...
...
@@ -161,7 +161,7 @@ class _Mimic3Reader(object):
self
.
timestep
=
timestep
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_subject_label
=
self
.
df_subjects
[[
'SUBJECT_ID'
,
'ICUSTAY_ID'
]]
\
.
merge
(
self
.
df_label
,
on
=
'ICUSTAY_ID'
,
how
=
'right'
)
\
...
...
mimic3_experiments/3_ML_models/run_shallow_all.sh
View file @
f3f7fe03
...
...
@@ -6,7 +6,7 @@ mkdir -p output
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'
)
\
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'
)
\
2>
>(
tee
'log/outcome=mortality,T=48.0,dt=1.0,RF.err'
>
&2
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment