YerevaNN / mimic3-benchmarks

Python suite to construct benchmark machine learning datasets from the MIMIC-III 💊 clinical database.
https://arxiv.org/abs/1703.07771
MIT License
806 stars 329 forks source link

ValueError: '0' is not in list #122

Open Ownspirit opened 2 years ago

Ownspirit commented 2 years ago

When I run below command, got a error message. Any idea to fix it? Thanks.

python -um mimic3models.length_of_stay.main --network mimic3models/keras_models/lstm.py --dim 64 --timestep 1.0 --depth 1 --dropout 0.3 --mode train --batch_size 8 --partition custom --output_dir mimic3models/length_of_stay
Traceback (most recent call last):
  File "G:\Anaconda3\envs\keras\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "G:\Anaconda3\envs\keras\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "E:\Model\NewYerevaNN\mimic3-benchmarks\mimic3models\in_hospital_mortality\main.py", line 109, in <module>
    train_raw = utils.load_data(train_reader, discretizer, normalizer, args.small_part)
  File "E:\Model\NewYerevaNN\mimic3-benchmarks\mimic3models\in_hospital_mortality\utils.py", line 18, in load_data
    data = [discretizer.transform(X, end=t)[0] for (X, t) in zip(data, ts)]
  File "E:\Model\NewYerevaNN\mimic3-benchmarks\mimic3models\in_hospital_mortality\utils.py", line 18, in <listcomp>
    data = [discretizer.transform(X, end=t)[0] for (X, t) in zip(data, ts)]
  File "E:\Model\NewYerevaNN\mimic3-benchmarks\mimic3models\preprocessing.py", line 109, in 
    write(data, bin_id, channel, row[j], begin_pos)
  File "E:\Model\NewYerevaNN\mimic3-benchmarks\mimic3models\preprocessing.py", line 80, in write
    category_id = self._possible_values[channel].index(value)
ValueError: '0' is not in list