Package: lemonpie
lemonpieAn open source deep learning library for Electronic Health Record (EHR) data.In this initial release of the library ..it implements 2 deep learning models (an LSTM and a CNN) based on popular papersthat can be trained on synthetic EHR data, created using the open sourceSynthea Patient Generatorto predict conditions that are on theCDC's list of top chronic diseasesthat contribute most to healthcare costsand is easily configurable to train on and predict any conditions in the datasetThe end goal is tokeep adding more model implementationskeep adding different publicly available datasetsand have a leaderboard to track which models and configurations work best on these datasetsInstallWith condaconda install -c corazonlabs -c fastai -c conda-forge lemonpieWith pippip install lemonpieOr ..Git clone the repohttps://github.com/corazonlabs/lemonpie.gitCreate a new conda env using theenvironment.ymlfilecd lemonpieconda env create --name lemonpie --file environment.ymlHow to useRead through and then run the followingQuick Startguides to get a general idea.if using the cloned repo, run these noteboooks99_quick_walkthru.ipynb99_running_exps.ipynbif using installed lib, just open a jupyter notebook and copy, paste & run cell-by-cell from these guidesQuick WalkthroughRunning ExperimentsSetup SyntheaRefer tocondensed instructionsGenerate different datasets you like - e.g. 1K, 5K, 10KRun experimentsRefer toDetailed Docsfor customizationsRoadmapA leader-board to track which models and configurations work best on different publicly available datasets.Callbacks, Mixed Precision, etcEither upgrade the library to use fastai v2.Or as a minimum, build functionality for fastai-style callbacks &PyTorch AMP.More modelsPick some of the best EHR models out there and implement them.Ideas are welcome.More datasetseICU and MIMIC3 possibly.Ideas are welcome.NLP on clinical notesSynthea does not have clinical notes, so this can only be done with other datasets.Predicting different conditionsAgain different datasets will allow this - e.g. hospitalization data (length of stay, in-patient mortality), ER data, etc.Integraion with Experiment management tools like W&B, Comet, etc,.Known Issues & Limitationsnum_workers > 0not working yet, under investigationWorkaround - depending upon your GPU capacity, you can load the entire dataset on GPU pre-training with a single switchIf running manually setlazy_load_gpu=Falsewhen creating the data object withEHRData(.... )If running through an Experiment config file, set it in theexperiment.yamlfileTest coverageNeed to write more tests for more comprehensive coverageReferencesThis library is created using the awesomenbdevSyntheaSynthetic Patient Population SimulatorJason Walonoski, Mark Kramer, Joseph Nichols, Andre Quina, Chris Moesel, Dylan Hall, Carlton Duffett, Kudakwashe Dube, Thomas Gallagher, Scott McLachlan, Synthea:An approach, method, and software mechanism for generating synthetic patients and the synthetic electronic health care record, Journal of the American Medical Informatics Association, Volume 25, Issue 3, March 2018, Pages 230–238,https://doi.org/10.1093/jamia/ocx079LSTM Modelbased onthis paper -Scalable and accurate deep learning for electronic health recordsRajkomar, A., Oren, E., Chen, K. et al. Scalable and accurate deep learning with electronic health records. npj Digital Med 1, 18 (2018).https://doi.org/10.1038/s41746-018-0029-1CNN Modelbasedon this paper -Deepr: A Convolutional Net for Medical RecordsNguyen, P., Tran, T., Wickramasinghe, N., & Venkatesh, S. (2017). $\mathtt {Deepr}$:A Convolutional Net for Medical Records. IEEE Journal of Biomedical and Health Informatics, 21, 22-30.