Skip to content

Commit

Permalink
deploy: 3a3f5e3
Browse files Browse the repository at this point in the history
  • Loading branch information
amrit110 committed Nov 29, 2023
1 parent 6b9ac18 commit 3f04d65
Show file tree
Hide file tree
Showing 35 changed files with 18,850 additions and 18,611 deletions.
2 changes: 1 addition & 1 deletion 404.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="generator" content="Docusaurus v3.0.0">
<title data-rh="true">Page Not Found | cyclops</title><meta data-rh="true" name="viewport" content="width=device-width,initial-scale=1"><meta data-rh="true" name="twitter:card" content="summary_large_image"><meta data-rh="true" property="og:url" content="https://vectorinstitute.github.io/cyclops/404.html"><meta data-rh="true" property="og:locale" content="en"><meta data-rh="true" name="docusaurus_locale" content="en"><meta data-rh="true" name="docusaurus_tag" content="default"><meta data-rh="true" name="docsearch:language" content="en"><meta data-rh="true" name="docsearch:docusaurus_tag" content="default"><meta data-rh="true" property="og:title" content="Page Not Found | cyclops"><link data-rh="true" rel="icon" href="/cyclops/img/favicon.ico"><link data-rh="true" rel="canonical" href="https://vectorinstitute.github.io/cyclops/404.html"><link data-rh="true" rel="alternate" href="https://vectorinstitute.github.io/cyclops/404.html" hreflang="en"><link data-rh="true" rel="alternate" href="https://vectorinstitute.github.io/cyclops/404.html" hreflang="x-default"><link rel="alternate" type="application/rss+xml" href="/cyclops/blog/rss.xml" title="cyclops RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/cyclops/blog/atom.xml" title="cyclops Atom Feed"><link rel="stylesheet" href="/cyclops/assets/css/styles.bd9f4b2a.css">
<script src="/cyclops/assets/js/runtime~main.dddfbb63.js" defer="defer"></script>
<script src="/cyclops/assets/js/runtime~main.8613a517.js" defer="defer"></script>
<script src="/cyclops/assets/js/main.2e0d731f.js" defer="defer"></script>
</head>
<body class="navigation-with-keyboard">
Expand Down
158 changes: 37 additions & 121 deletions api/_sources/intro.rst.txt
Original file line number Diff line number Diff line change
@@ -1,36 +1,22 @@
.. figure::
https://github.com/VectorInstitute/cyclops/blob/main/docs/source/theme/static/cyclops_logo-dark.png?raw=true
.. figure:: https://github.com/VectorInstitute/cyclops/blob/main/docs/source/theme/static/cyclops_logo-dark.png?raw=true
:alt: cyclops Logo

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

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

``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
|PyPI| |PyPI - Python Version| |code checks| |integration tests| |docs| |codecov| |docker| |license|

``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/nihcxr/nihcxr_report_periodic.html>`__
for clinical ML models
- ``report`` - Create `model report cards <https://vectorinstitute.github.io/cyclops/api/tutorials/nihcxr/nihcxr_report_periodic.html>`__ for clinical ML models

``cyclops`` also provides example end-to-end use case implementations on
clinical datasets such as
``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>`__
- `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
Expand All @@ -43,110 +29,46 @@ Installing cyclops using pip
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. All optional dependencies can
be installed with ``pycyclops[all]``, and specific sets of dependencies
are listed in the sections below.

+-----------------------------+--------------------------+--------------+
| Dependency | pip extra | Notes |
+=============================+==========================+==============+
| xgboost | xgboost | Allows use |
| | | of |
| | | `XGBoos |
| | | t <https://x |
| | | gboost.readt |
| | | hedocs.io/en |
| | | /stable/>`__ |
| | | model |
+-----------------------------+--------------------------+--------------+
| torch | torch | Allows use |
| | | of |
| | | `PyTorch < |
| | | https://pyto |
| | | rch.org/>`__ |
| | | models |
+-----------------------------+--------------------------+--------------+
| torchvision | torchvision | Allows use |
| | | of |
| | | `T |
| | | orchvision < |
| | | https://pyto |
| | | rch.org/visi |
| | | on/stable/in |
| | | dex.html>`__ |
| | | library |
+-----------------------------+--------------------------+--------------+
| torchxrayvision | torchxrayvision | Uses |
| | | `TorchXR |
| | | ayVision <ht |
| | | tps://mlmed. |
| | | org/torchxra |
| | | yvision/>`__ |
| | | library |
+-----------------------------+--------------------------+--------------+
| monai | monai | Uses |
| | | `M |
| | | ONAI <https: |
| | | //github.com |
| | | /Project-MON |
| | | AI/MONAI>`__ |
| | | to load and |
| | | transform |
| | | images |
+-----------------------------+--------------------------+--------------+
| alibi | alibi | Uses |
| | | `Alibi <http |
| | | s://docs.sel |
| | | don.io/proje |
| | | cts/alibi/en |
| | | /stable/>`__ |
| | | for |
| | | additional |
| | | ex |
| | | plainability |
| | | f |
| | | unctionality |
+-----------------------------+--------------------------+--------------+
| alibi-detect | alibi-detect | Uses `Alibi |
| | | Detect |
| | | <https://doc |
| | | s.seldon.io/ |
| | | projects/ali |
| | | bi-detect/en |
| | | /stable/>`__ |
| | | for dataset |
| | | shift |
| | | detection |
+-----------------------------+--------------------------+--------------+
``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. All optional dependencies can be installed with ``pycyclops[all]``, and specific sets of dependencies are listed in the sections 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:
The development environment can be set up using `poetry <https://python-poetry.org/docs/#installation>`__. Hence, make sure it is installed and then run:

.. code:: 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:
In order to install dependencies for testing (codestyle, unit tests, integration tests), run:

.. code:: 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:
API documentation is built using `Sphinx <https://www.sphinx-doc.org/en/master/>`__ and can be locally built by:

.. code:: bash
Expand All @@ -157,32 +79,26 @@ built by:
Contributing
------------

Contributing to cyclops is welcomed. See
`Contributing <https://vectorinstitute.github.io/cyclops/api/intro.html>`__
for guidelines.
Contributing to cyclops is welcomed. See `Contributing <https://vectorinstitute.github.io/cyclops/api/intro.html>`__ for guidelines.

📚 `Documentation <https://vectorinstitute.github.io/cyclops/>`__
=================================================================

📓 Notebooks
============

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

.. code:: 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>``.
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:
Reference to cite when you use ``cyclops`` in a project or a research paper:

::

Expand Down
10 changes: 8 additions & 2 deletions api/_sources/tutorials/mimiciv/mortality_prediction.ipynb.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"from cycquery import MIMICIVQuerier\n",
"from datasets import Dataset\n",
"from datasets.features import ClassLabel\n",
"from imblearn.over_sampling import SMOTE\n",
"from sklearn.compose import ColumnTransformer\n",
"from sklearn.impute import SimpleImputer\n",
"from sklearn.pipeline import Pipeline\n",
Expand Down Expand Up @@ -584,7 +585,12 @@
" ),\n",
" ],\n",
" remainder=\"passthrough\",\n",
")"
")\n",
"preprocessor_pipeline = [\n",
" (\"preprocessor\", preprocessor),\n",
" (\"oversampling\", SMOTE(random_state=RANDOM_SEED)),\n",
"]\n",
"preprocessor_pipeline = Pipeline(preprocessor_pipeline)"
]
},
{
Expand Down Expand Up @@ -692,7 +698,7 @@
"mortality_task.train(\n",
" dataset[\"train\"],\n",
" model_name=model_name,\n",
" transforms=preprocessor,\n",
" transforms=preprocessor_pipeline,\n",
" best_model_params=best_model_params,\n",
")"
]
Expand Down
Loading

0 comments on commit 3f04d65

Please sign in to comment.