pycyclops


Namepycyclops JSON
Version 0.2.10 PyPI version JSON
download
home_pagehttps://github.com/VectorInstitute/cyclops
SummaryFramework for healthcare ML implementation
upload_time2024-06-27 17:21:15
maintainerNone
docs_urlNone
authorVector AI Engineering
requires_python<3.12,>=3.9
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ![cyclops Logo](https://github.com/VectorInstitute/cyclops/blob/main/docs/source/_static/cyclops_logo-dark.png?raw=true)

--------------------------------------------------------------------------------

[![PyPI](https://img.shields.io/pypi/v/pycyclops)](https://pypi.org/project/pycyclops)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycyclops)
[![code checks](https://github.com/VectorInstitute/cyclops/actions/workflows/code_checks.yml/badge.svg)](https://github.com/VectorInstitute/cyclops/actions/workflows/code_checks.yml)
[![integration tests](https://github.com/VectorInstitute/cyclops/actions/workflows/integration_tests.yml/badge.svg)](https://github.com/VectorInstitute/cyclops/actions/workflows/integration_tests.yml)
[![docs](https://github.com/VectorInstitute/cyclops/actions/workflows/docs.yml/badge.svg)](https://github.com/VectorInstitute/cyclops/actions/workflows/docs.yml)
[![codecov](https://codecov.io/gh/VectorInstitute/cyclops/branch/main/graph/badge.svg)](https://codecov.io/gh/VectorInstitute/cyclops)
[![docker](https://github.com/VectorInstitute/cyclops/actions/workflows/docker.yml/badge.svg)](https://hub.docker.com/r/vectorinstitute/cyclops)
[![license](https://img.shields.io/github/license/VectorInstitute/cyclops.svg)](https://github.com/VectorInstitute/cyclops/blob/main/LICENSE.md)

``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](https://github.com/huggingface/datasets) to efficiently load and slice different modalities of data
* `models` - Use common model implementations using [scikit-learn](https://scikit-learn.org/stable/) and [PyTorch](https://pytorch.org/)
* `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](https://vectorinstitute.github.io/cyclops/api/tutorials/kaggle/heart_failure_report_periodic.html) for clinical ML models

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

* [NIH chest x-ray](https://www.nih.gov/news-events/news-releases/nih-clinical-center-provides-one-largest-publicly-available-chest-x-ray-datasets-scientific-community)
* [MIMIC-IV](https://physionet.org/content/mimiciv/2.0/)


## 🐣 Getting Started

### Installing cyclops using pip

```bash
python3 -m pip install pycyclops
```

`cyclops` has many optional dependencies that are used for specific functionality. For
example, the [monai](https://github.com/Project-MONAI/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](https://xgboost.readthedocs.io/en/stable/) model                                     |
| torch            | torch           | Allows use of [PyTorch](https://pytorch.org/) models                                                         |
| torchvision      | torchvision     | Allows use of [Torchvision](https://pytorch.org/vision/stable/index.html) library                            |
| torchxrayvision  | torchxrayvision | Uses [TorchXRayVision](https://mlmed.org/torchxrayvision/) library                                           |
| monai            | monai           | Uses [MONAI](https://github.com/Project-MONAI/MONAI) to load and transform images                            |
| alibi            | alibi           | Uses [Alibi](https://docs.seldon.io/projects/alibi/en/stable/) for additional explainability functionality   |
| alibi-detect     | alibi-detect    | Uses [Alibi Detect](https://docs.seldon.io/projects/alibi-detect/en/stable/) for dataset shift detection     |


## 🧑🏿‍💻 Developing

### Using poetry

The development environment can be set up using
[poetry](https://python-poetry.org/docs/#installation). Hence, make sure it is
installed and then run:

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

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

```bash
python3 -m poetry install --with test
```

API documentation is built using [Sphinx](https://www.sphinx-doc.org/en/master/) and
can be locally built by:

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

### Contributing

Contributing to cyclops is welcomed.
See [Contributing](https://vectorinstitute.github.io/cyclops/api/contributing.html) for
guidelines.


## 📚 [Documentation](https://vectorinstitute.github.io/cyclops/)

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:

```bash
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}
}
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/VectorInstitute/cyclops",
    "name": "pycyclops",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<3.12,>=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "Vector AI Engineering",
    "author_email": "cyclops@vectorinstitute.ai",
    "download_url": "https://files.pythonhosted.org/packages/f4/61/a85e0f9447cddfa01f1b7f3f6d8039e0e947e8d31f497ea0640c23bbfdf5/pycyclops-0.2.10.tar.gz",
    "platform": null,
    "description": "![cyclops Logo](https://github.com/VectorInstitute/cyclops/blob/main/docs/source/_static/cyclops_logo-dark.png?raw=true)\n\n--------------------------------------------------------------------------------\n\n[![PyPI](https://img.shields.io/pypi/v/pycyclops)](https://pypi.org/project/pycyclops)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycyclops)\n[![code checks](https://github.com/VectorInstitute/cyclops/actions/workflows/code_checks.yml/badge.svg)](https://github.com/VectorInstitute/cyclops/actions/workflows/code_checks.yml)\n[![integration tests](https://github.com/VectorInstitute/cyclops/actions/workflows/integration_tests.yml/badge.svg)](https://github.com/VectorInstitute/cyclops/actions/workflows/integration_tests.yml)\n[![docs](https://github.com/VectorInstitute/cyclops/actions/workflows/docs.yml/badge.svg)](https://github.com/VectorInstitute/cyclops/actions/workflows/docs.yml)\n[![codecov](https://codecov.io/gh/VectorInstitute/cyclops/branch/main/graph/badge.svg)](https://codecov.io/gh/VectorInstitute/cyclops)\n[![docker](https://github.com/VectorInstitute/cyclops/actions/workflows/docker.yml/badge.svg)](https://hub.docker.com/r/vectorinstitute/cyclops)\n[![license](https://img.shields.io/github/license/VectorInstitute/cyclops.svg)](https://github.com/VectorInstitute/cyclops/blob/main/LICENSE.md)\n\n``cyclops`` is a toolkit for facilitating research and deployment of ML models for healthcare. It provides a few high-level APIs namely:\n\n* `data` - Create datasets for training, inference and evaluation. We use the popular \ud83e\udd17 [datasets](https://github.com/huggingface/datasets) to efficiently load and slice different modalities of data\n* `models` - Use common model implementations using [scikit-learn](https://scikit-learn.org/stable/) and [PyTorch](https://pytorch.org/)\n* `tasks` - Use common ML task formulations such as binary classification or multi-label classification on tabular, time-series and image data\n* `evaluate` - Evaluate models on clinical prediction tasks\n* `monitor` - Detect dataset shift relevant for clinical use cases\n* `report` - Create [model report cards](https://vectorinstitute.github.io/cyclops/api/tutorials/kaggle/heart_failure_report_periodic.html) for clinical ML models\n\n``cyclops`` also provides example end-to-end use case implementations on clinical datasets such as\n\n* [NIH chest x-ray](https://www.nih.gov/news-events/news-releases/nih-clinical-center-provides-one-largest-publicly-available-chest-x-ray-datasets-scientific-community)\n* [MIMIC-IV](https://physionet.org/content/mimiciv/2.0/)\n\n\n## \ud83d\udc23 Getting Started\n\n### Installing cyclops using pip\n\n```bash\npython3 -m pip install pycyclops\n```\n\n`cyclops` has many optional dependencies that are used for specific functionality. For\nexample, the [monai](https://github.com/Project-MONAI/MONAI) library is used for loading\nDICOM images to create datasets. Hence, `monai` can be installed using\n``python3 -m pip install pycyclops[monai]``. Specific sets of dependencies are listed\nbelow.\n\n\n| Dependency       | pip extra       | Notes                                                                                                        |\n| ----------       | ---------       | -----                                                                                                        |\n| xgboost          | xgboost         | Allows use of [XGBoost](https://xgboost.readthedocs.io/en/stable/) model                                     |\n| torch            | torch           | Allows use of [PyTorch](https://pytorch.org/) models                                                         |\n| torchvision      | torchvision     | Allows use of [Torchvision](https://pytorch.org/vision/stable/index.html) library                            |\n| torchxrayvision  | torchxrayvision | Uses [TorchXRayVision](https://mlmed.org/torchxrayvision/) library                                           |\n| monai            | monai           | Uses [MONAI](https://github.com/Project-MONAI/MONAI) to load and transform images                            |\n| alibi            | alibi           | Uses [Alibi](https://docs.seldon.io/projects/alibi/en/stable/) for additional explainability functionality   |\n| alibi-detect     | alibi-detect    | Uses [Alibi Detect](https://docs.seldon.io/projects/alibi-detect/en/stable/) for dataset shift detection     |\n\n\n## \ud83e\uddd1\ud83c\udfff\u200d\ud83d\udcbb Developing\n\n### Using poetry\n\nThe development environment can be set up using\n[poetry](https://python-poetry.org/docs/#installation). Hence, make sure it is\ninstalled and then run:\n\n```bash\npython3 -m poetry install\nsource $(poetry env info --path)/bin/activate\n```\n\nIn order to install dependencies for testing (codestyle, unit tests, integration tests),\nrun:\n\n```bash\npython3 -m poetry install --with test\n```\n\nAPI documentation is built using [Sphinx](https://www.sphinx-doc.org/en/master/) and\ncan be locally built by:\n\n```bash\npython3 -m poetry install --with docs\ncd docs\nmake html SPHINXOPTS=\"-D nbsphinx_allow_errors=True\"\n```\n\n### Contributing\n\nContributing to cyclops is welcomed.\nSee [Contributing](https://vectorinstitute.github.io/cyclops/api/contributing.html) for\nguidelines.\n\n\n## \ud83d\udcda [Documentation](https://vectorinstitute.github.io/cyclops/)\n\nIf you need to build the documentations locally, make sure to install ``Pandoc`` in addition to ``docs`` poetry group.\n\n\n## \ud83d\udcd3 Notebooks\n\nTo use jupyter notebooks, the python virtual environment can be installed and\nused inside an IPython kernel. After activating the virtual environment, run:\n\n```bash\npython3 -m ipykernel install --user --name <name_of_kernel>\n```\n\nNow, you can navigate to the notebook's ``Kernel`` tab and set it as\n``<name_of_kernel>``.\n\n\n## \ud83c\udf93 Citation\n\nReference to cite when you use `cyclops` in a project or a research paper:\n\n```\n@article {Krishnan2022.12.02.22283021,\n\tauthor = {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},\n\ttitle = {CyclOps: Cyclical development towards operationalizing ML models for health},\n\telocation-id = {2022.12.02.22283021},\n\tyear = {2022},\n\tdoi = {10.1101/2022.12.02.22283021},\n\tpublisher = {Cold Spring Harbor Laboratory Press},\n\tURL = {https://www.medrxiv.org/content/early/2022/12/08/2022.12.02.22283021},\n\tjournal = {medRxiv}\n}\n```\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Framework for healthcare ML implementation",
    "version": "0.2.10",
    "project_urls": {
        "Documentation": "https://vectorinstitute.github.io/cyclops/",
        "Homepage": "https://github.com/VectorInstitute/cyclops",
        "Repository": "https://github.com/VectorInstitute/cyclops"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "01da945ad5b2e37433e13b6e767f576d577abb789cfdf692d6ee41df21a0fe88",
                "md5": "6d638e8d8b85270c593a5c00d00b0311",
                "sha256": "b2450b4bfc535a3fa20ba91b5999df87e54073055886854bb144ef275e4ac4f0"
            },
            "downloads": -1,
            "filename": "pycyclops-0.2.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6d638e8d8b85270c593a5c00d00b0311",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<3.12,>=3.9",
            "size": 408702,
            "upload_time": "2024-06-27T17:21:13",
            "upload_time_iso_8601": "2024-06-27T17:21:13.811866Z",
            "url": "https://files.pythonhosted.org/packages/01/da/945ad5b2e37433e13b6e767f576d577abb789cfdf692d6ee41df21a0fe88/pycyclops-0.2.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f461a85e0f9447cddfa01f1b7f3f6d8039e0e947e8d31f497ea0640c23bbfdf5",
                "md5": "5a154eebd79f19fb3be420cad4a021e8",
                "sha256": "198311271edaeea7b6bf85aa4a49fa9b0383a056ecabbe64ec6ddc29b6c45cd4"
            },
            "downloads": -1,
            "filename": "pycyclops-0.2.10.tar.gz",
            "has_sig": false,
            "md5_digest": "5a154eebd79f19fb3be420cad4a021e8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<3.12,>=3.9",
            "size": 308208,
            "upload_time": "2024-06-27T17:21:15",
            "upload_time_iso_8601": "2024-06-27T17:21:15.601721Z",
            "url": "https://files.pythonhosted.org/packages/f4/61/a85e0f9447cddfa01f1b7f3f6d8039e0e947e8d31f497ea0640c23bbfdf5/pycyclops-0.2.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-27 17:21:15",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "VectorInstitute",
    "github_project": "cyclops",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pycyclops"
}
        
Elapsed time: 1.07254s