Medical sequential decision making simulation tools.
Project description
The Medkit-learn(ing) Environment
Alex J. Chan, Ioana Bica, Alihan Huyuk, Daniel Jarrett, and Mihaela van der Schaar
The Medkit-Learn(ing) Environment, or Medkit, is a publicly available Python package providing simple and easy access to high-fidelity synthetic medical data.
Primarily, Medkit is a tool that supports: (1) a variety of realistic environment models—learned from actual data, to reflect real medical settings), thus allowing simulation of (2) a variety of expressive and customisable policy models that represent complex human decision-behaviours; as well as (3) ensuring that the environment and policy components are disentangled—hence independently controllable.
By fulfilling the above, Medkit seeks to enable advances in decision modelling to be validated more easily and robustly by enabling users to obtain batch datasets with known ground-truth policy parameterisations that simulate decision making behaviours with various degrees of Markovianity, bounded rationality, confounding, individual consistency and variation in practice.
Medkit is pip installable - we recommend cloning it, optionally creating a virtual env, and installing it (this will automatically install dependencies):
git clone https://github.com/XanderJC/medkit-learn.git
cd medkit-learn
pip install -e .
Example usage:
import medkit as mk
synthetic_dataset = mk.batch_generate(
domain = "Ward",
environment = "CRN",
policy = "LSTM",
size = 1000,
test_size = 200,
max_length = 10,
scale = True
)
static_train, observations_train, actions_train = synthetic_dataset['training']
static_test, observations_test, actions_test = synthetic_dataset['testing']
While medical machine learning is by necessity almost always entirely offline, we also provide an interface through which you can interact online with the environment should you find that useful. For example, you could train a custom RL policy on this environment with a specified reward function, then you can test inference algorithms on their ability to represent the policy.
env = mk.live_simulate(
domain="ICU",
environment="SVAE"
)
static_obs, observation, info = env.reset()
observation, reward, info, done = env.step(action)
Citing
If you use this software please cite as follows:
@misc{chan2021medkitlearning,
title={The Medkit-Learn(ing) Environment: Medical Decision Modelling through Simulation},
author={Alex J. Chan and Ioana Bica and Alihan Huyuk and Daniel Jarrett and Mihaela van der Schaar},
year={2021},
eprint={2106.04240},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file medkit_learn-0.1.0-py3-none-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: medkit_learn-0.1.0-py3-none-macosx_10_14_x86_64.whl
- Upload date:
- Size: 22.4 MB
- Tags: Python 3, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.6.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc4428ed27a5a8c49fac46488ec559b63139598e92328649690bdd69243a2da7 |
|
MD5 | 53dc810f29bd8eef335ab88396f99504 |
|
BLAKE2b-256 | 70704287b14ebc6ed1b33ad04b7cb9b61dd0a51856e83c36184b9e8d3d0f3b49 |
File details
Details for the file medkit_learn-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: medkit_learn-0.1.0-py3-none-any.whl
- Upload date:
- Size: 22.4 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.7.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a69ac8e327ba0e7a8cdd3d7769987aa43653a9d8401c672d2ed49be07ddb730 |
|
MD5 | 841d4b90f7d0630c1d7351af632b71f4 |
|
BLAKE2b-256 | c6dc9a139fcf0c44b6d6550d91b0fdbb99c69a807d9de10a17d1235bb134577f |