Skip to main content

Framework for healthcare ML implementation

Project description

cyclops Logo


PyPI PyPI - Python Version code checks integration tests docs codecov docker

cyclops is a toolkit for facilitating research and deployment of ML models for healthcare. It provides a few high-level APIs namely:

  • data - Create datasets for training, inference and evaluation. We use the popular 🤗 datasets to efficiently load and slice different modalities of data
  • models - Use common model implementations using scikit-learn and PyTorch
  • tasks - Use common ML task formulations such as binary classification or multi-label classification on tabular, time-series and image data
  • evaluate - Evaluate models on clinical prediction tasks
  • monitor - Detect dataset shift relevant for clinical use cases
  • report - Create model report cards for clinical ML models

cyclops also provides example end-to-end use case implementations on clinical datasets such as

🐣 Getting Started

Installing cyclops using pip

python3 -m pip install pycyclops

cyclops has many optional dependencies that are used for specific functionality. For example, the monai library is used for loading DICOM images to create datasets. Hence, monai can be installed using python3 -m pip install pycyclops[monai]. Specific sets of dependencies are listed below.

Dependency pip extra Notes
xgboost xgboost Allows use of XGBoost model
torch torch Allows use of PyTorch models
torchvision torchvision Allows use of Torchvision library
torchxrayvision torchxrayvision Uses TorchXRayVision library
monai monai Uses MONAI to load and transform images
alibi alibi Uses Alibi for additional explainability functionality
alibi-detect alibi-detect Uses Alibi Detect for dataset shift detection

🧑🏿‍💻 Developing

Using poetry

The development environment can be set up using poetry. Hence, make sure it is installed and then run:

python3 -m poetry install
source $(poetry env info --path)/bin/activate

In order to install dependencies for testing (codestyle, unit tests, integration tests), run:

python3 -m poetry install --with test

API documentation is built using Sphinx and can be locally built by:

python3 -m poetry install --with docs
cd docs
make html SPHINXOPTS="-D nbsphinx_allow_errors=True"

Contributing

Contributing to cyclops is welcomed. See Contributing for guidelines.

📚 Documentation

If you need to build the documentations locally, make sure to install Pandoc in addition to docs poetry group.

📓 Notebooks

To use jupyter notebooks, the python virtual environment can be installed and used inside an IPython kernel. After activating the virtual environment, run:

python3 -m ipykernel install --user --name <name_of_kernel>

Now, you can navigate to the notebook's Kernel tab and set it as <name_of_kernel>.

🎓 Citation

Reference to cite when you use cyclops in a project or a research paper:

@article {Krishnan2022.12.02.22283021,
	author = {Krishnan, Amrit and Subasri, Vallijah and McKeen, Kaden and Kore, Ali and Ogidi, Franklin and Alinoori, Mahshid and Lalani, Nadim and Dhalla, Azra and Verma, Amol and Razak, Fahad and Pandya, Deval and Dolatabadi, Elham},
	title = {CyclOps: Cyclical development towards operationalizing ML models for health},
	elocation-id = {2022.12.02.22283021},
	year = {2022},
	doi = {10.1101/2022.12.02.22283021},
	publisher = {Cold Spring Harbor Laboratory Press},
	URL = {https://www.medrxiv.org/content/early/2022/12/08/2022.12.02.22283021},
	journal = {medRxiv}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pycyclops-0.2.11.tar.gz (309.7 kB view details)

Uploaded Source

Built Distribution

pycyclops-0.2.11-py3-none-any.whl (410.2 kB view details)

Uploaded Python 3

File details

Details for the file pycyclops-0.2.11.tar.gz.

File metadata

  • Download URL: pycyclops-0.2.11.tar.gz
  • Upload date:
  • Size: 309.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for pycyclops-0.2.11.tar.gz
Algorithm Hash digest
SHA256 48d195dd2ae6d0af26364507f149a3e777fb087401159a3112b18872940e878a
MD5 d03f755868eb6bc309692a8cd73733ad
BLAKE2b-256 27f7cbc3dc58237df49bc90340ff586a014c12d5e44fa96e0f851ae21c610ac9

See more details on using hashes here.

File details

Details for the file pycyclops-0.2.11-py3-none-any.whl.

File metadata

  • Download URL: pycyclops-0.2.11-py3-none-any.whl
  • Upload date:
  • Size: 410.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.5

File hashes

Hashes for pycyclops-0.2.11-py3-none-any.whl
Algorithm Hash digest
SHA256 046ad377b666085acd2d00255e3a867a3c5347f8e112234bbad9b921d8ed48ac
MD5 85c32c6fd3178fb0d0923d99b08b1a54
BLAKE2b-256 ce700e47f8fb4270f9268d5f7dc1bb09d215321abfd8736a265481085d004f7f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page