Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when running preprocessing #1

Open
viandres opened this issue Jul 4, 2022 · 2 comments
Open

Error when running preprocessing #1

viandres opened this issue Jul 4, 2022 · 2 comments

Comments

@viandres
Copy link

viandres commented Jul 4, 2022

I am trying to synthesise the MIMIC IV data with the help of your code and README instructions.

After downloading the mimic dataset to the data/mimic4/raw location and setting the path environment variables I run:

python run_preprocess.py --dataset mimic4 --train_num 6000 --sample_num 10000

And get the following error:

FileNotFoundError: [Errno 2] No such file or directory: 'data/mimic4/raw/icd10-icd9.csv'

My directory structure is as follows:

image

Where is the icd10-icd9.csv file? I cannot find it in the mimic4 dataset.

Thank you already!

@LuChang-CS
Copy link
Owner

Hi, vandreslime, this icd10-icd9.csv is an unofficial mapping from ICD10 codes to ICD9 codes. I found it on the Internet, so I did not upload it to avoid some disagreement.

Here I uploaded it for now. You can download it for your project. In the future, I guess I will try to directly generate ICD10 codes for mimic4 without mapping them to ICD9.

@viandres
Copy link
Author

viandres commented Jul 5, 2022

Hi @LuChang-CS ,
great and thank you so much for the very quick response!

I got a new error:

File "/.../MTGAN/preprocess/parse_csv.py", line 201, in _load_icd_map
    icd_csv = pandas.read_csv(os.path.join(self.path, filename), usecols=cols, converters=converters)
...
ValueError: Usecols do not match columns, columns expected but not found: ['ICD9']

I guessed the last column name "Pure Victorian Logical" needed to be renamed to ICD9. Then I could successfully run the preprocessing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants