Skip to content

Commit

Permalink
Add documentation for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hrayrhar committed Mar 30, 2020
1 parent 1c2e820 commit 685c099
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions mimic3benchmark/tests/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Tests for checking whether the benchmark datasets were generated correctly

The main script is the `mimic3benchmark/tests/hash_tables.py` script which takes a directory and hashes all `.csv` files inside it recursively.
The output is a `.pkl` file which lists all `.csv` files and their hashes.
If this files matches with the corresponding file from `mimic3benchmark/tests/resources` then the test is successful.
Here are a couple of examples.

### Root directory
```bash
python -um mimic3benchmark.tests.hash_tables -d data/root -o root-final.pkl;
diff root-final.pkl mimic3benchmark/tests/resources/root-final.pkl;
```

### In-hospital mortality
```bash
python -um mimic3benchmark.tests.hash_tables -d data/in-hospital-mortality -o ihm.pkl;
diff ihm.pkl mimic3benchmark/tests/resources/ihm.pkl;
```

### Decompensation
```bash
python -um mimic3benchmark.tests.hash_tables -d data/decompensation -o decomp.pkl;
diff decomp.pkl mimic3benchmark/tests/resources/decomp.pkl;
```

### Length-of-stay
```bash
python -um mimic3benchmark.tests.hash_tables -d data/length-of-stay -o los.pkl;
diff los.pkl mimic3benchmark/tests/resources/los.pkl;
```

### Phenotyping
```bash
python -um mimic3benchmark.tests.hash_tables -d data/phenotyping -o pheno.pkl;
diff pheno.pkl mimic3benchmark/tests/resources/pheno.pkl;
```

### Multitasking
```bash
python -um mimic3benchmark.tests.hash_tables -d data/multitask -o multitasking.pkl;
diff multitasking.pkl mimic3benchmark/tests/resources/multitasking.pkl;
```

0 comments on commit 685c099

Please sign in to comment.