FIDDLE icon indicating copy to clipboard operation
FIDDLE copied to clipboard

Pre-Filter ID Issue

Open raghurams95 opened this issue 3 years ago • 3 comments

Hello,

I am trying to replicate the results from the paper and I am stuck at getting the features for the time-variant variables. I run the following and I get a KeyError: ID in the Pre-Filter step. Could you please help in figuring out what I am doing wrong? I have run all the steps from the mimic3_experiements to generate the required files. Thank you! image_2022-02-23_133529

raghurams95 avatar Feb 23 '22 18:02 raghurams95

Hi, I believe this is a column naming issue. Can you check the df_population file (mortality_48.h.csv) if it uses ID or ICUSTAY_ID as the identifier column?

shengpu-tang avatar Feb 24 '22 16:02 shengpu-tang

Hi, the file does name them as ID.

mortality_48.0h.csv

raghurams95 avatar Feb 24 '22 16:02 raghurams95

Hi, I apologize for not checking carefully. From the line where the error is raised, df = df[df['ID'].isin(df_population.index)]

You should check if df has a column named ID. This should be the from the file named input_data.csv.

shengpu-tang avatar Feb 24 '22 18:02 shengpu-tang