bnnsurv


Namebnnsurv JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/thecml/UE-BNNSurv
SummaryTensorFlow 2.x Bayesian Neural Network for Survival Analysis
upload_time2023-11-17 13:33:31
maintainer
docs_urlNone
authorChristian Marius Lillelund
requires_python
license
keywords deep learning neural network bayesian learning survival analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Uncertainty Estimation in Deep Bayesian Survival Models

# *UPDATE 11/16/23: pip package now available. Use "pip install bnnsurv". Tested with TensorFlow 2.13 and TensorFlow Probability 0.21. See [test file](https://github.com/thecml/UE-BNNSurv/blob/main/tests/test_bnn_surv.py) for how to use.

This repository is the official TensorFlow implementation of [Uncertainty Estimation in Deep Bayesian Survival Models](https://ieeexplore.ieee.org/document/10313466), BHI 2023.

The proposed method is implemented based on [TensorFlow Probability](https://github.com/tensorflow/probability).

<b>Full paper is available on IEEE Xplore: https://ieeexplore.ieee.org/document/10313466</b>

<p align="left"><img src="https://github.com/thecml/UE-BNNSurv/blob/main/img/BNN.png" width="40%" height="40%">

In this work, we introduce the use of Bayesian inference techniques for survival analysis in neural networks that rely on the Cox’s proportional hazard assumption, for which we discuss a new flexible and effective architecture. We implement three architectures: a fully-deterministic neural network that acts as a baseline, a Bayesian model using variational inference and one using Monte-Carlo Dropout.

Experiments show that the Bayesian models improve predictive performance over SOTA neural networks in a test dataset with few samples (WHAS500, 500 samples) and provide comparable performance in two larger ones (SEER and SUPPORT, 4024 and 8873 samples, respectively)

<p align="center"><img src="https://github.com/thecml/UE-BNNSurv/blob/main/img/seer_surv_all_models.png" width="30%" height="30%" /> <img src="https://github.com/thecml/UE-BNNSurv/blob/main/img/seer_surv_grade_mcd.png" width="30%" height="30%" /> <img src="https://github.com/thecml/UE-BNNSurv/blob/main/img/seer_surv_pdf.png" width="31%" height="31%" />


License
--------
To view the license for this work, visit https://github.com/thecml/UE-BNNSurv/blob/main/LICENSE


Requirements
----------------------
To run the models, please refer to [Requirements.txt](https://github.com/thecml/UE-BNNSurv/blob/main/requirements.txt).

Install auton-survival manually from Git:
```
pip install git+https://github.com/autonlab/auton-survival.git
```
Code was tested in virtual environment with `Python 3.8`, `TensorFlow 2.11` and `TensorFlow Probability 0.19`


Training
--------
- Make directories `mkdir results` and `mkdir models`.

- Please refer to `paths.py` to set appropriate paths. By default, results are in `results` and models in `models`

- Network configuration using best hyperparameters are found in `configs/*`

- Run the training code:

```
# SOTA models
python train_sota_models.py

# BNN Models
python train_bnn_models.py
```


Evaluation
--------
- After model training, view the results in the `results` folder.


Visualization
---------
- Run the visualization notebooks:
```
jupyter notebook plot_survival_curves.ipynb
jupyter notebook plot_survival_time.ipynb
```


Citation
--------
```
@inproceedings{lillelund_uncertainty_2023,
  author={Lillelund, Christian Marius and Magris, Martin and Pedersen, Christian Fischer},
  booktitle={2023 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI)}, 
  title={Uncertainty Estimation in Deep Bayesian Survival Models}, 
  year={2023},
  pages={1-4},
  doi={10.1109/BHI58575.2023.10313466}
}
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thecml/UE-BNNSurv",
    "name": "bnnsurv",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "Deep Learning,Neural Network,Bayesian Learning,Survival Analysis",
    "author": "Christian Marius Lillelund",
    "author_email": "chr1000@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/59/ee/2148113cc2906e3bcd1759056ac59d59bf53e700a669c998f5c06dc6d122/bnnsurv-0.1.3.tar.gz",
    "platform": null,
    "description": "# Uncertainty Estimation in Deep Bayesian Survival Models\n\n# *UPDATE 11/16/23: pip package now available. Use \"pip install bnnsurv\". Tested with TensorFlow 2.13 and TensorFlow Probability 0.21. See [test file](https://github.com/thecml/UE-BNNSurv/blob/main/tests/test_bnn_surv.py) for how to use.\n\nThis repository is the official TensorFlow implementation of [Uncertainty Estimation in Deep Bayesian Survival Models](https://ieeexplore.ieee.org/document/10313466), BHI 2023.\n\nThe proposed method is implemented based on [TensorFlow Probability](https://github.com/tensorflow/probability).\n\n<b>Full paper is available on IEEE Xplore: https://ieeexplore.ieee.org/document/10313466</b>\n\n<p align=\"left\"><img src=\"https://github.com/thecml/UE-BNNSurv/blob/main/img/BNN.png\" width=\"40%\" height=\"40%\">\n\nIn this work, we introduce the use of Bayesian inference techniques for survival analysis in neural networks that rely on the Cox\u00e2\u20ac\u2122s proportional hazard assumption, for which we discuss a new flexible and effective architecture. We implement three architectures: a fully-deterministic neural network that acts as a baseline, a Bayesian model using variational inference and one using Monte-Carlo Dropout.\n\nExperiments show that the Bayesian models improve predictive performance over SOTA neural networks in a test dataset with few samples (WHAS500, 500 samples) and provide comparable performance in two larger ones (SEER and SUPPORT, 4024 and 8873 samples, respectively)\n\n<p align=\"center\"><img src=\"https://github.com/thecml/UE-BNNSurv/blob/main/img/seer_surv_all_models.png\" width=\"30%\" height=\"30%\" /> <img src=\"https://github.com/thecml/UE-BNNSurv/blob/main/img/seer_surv_grade_mcd.png\" width=\"30%\" height=\"30%\" /> <img src=\"https://github.com/thecml/UE-BNNSurv/blob/main/img/seer_surv_pdf.png\" width=\"31%\" height=\"31%\" />\n\n\nLicense\n--------\nTo view the license for this work, visit https://github.com/thecml/UE-BNNSurv/blob/main/LICENSE\n\n\nRequirements\n----------------------\nTo run the models, please refer to [Requirements.txt](https://github.com/thecml/UE-BNNSurv/blob/main/requirements.txt).\n\nInstall auton-survival manually from Git:\n```\npip install git+https://github.com/autonlab/auton-survival.git\n```\nCode was tested in virtual environment with `Python 3.8`, `TensorFlow 2.11` and `TensorFlow Probability 0.19`\n\n\nTraining\n--------\n- Make directories `mkdir results` and `mkdir models`.\n\n- Please refer to `paths.py` to set appropriate paths. By default, results are in `results` and models in `models`\n\n- Network configuration using best hyperparameters are found in `configs/*`\n\n- Run the training code:\n\n```\n# SOTA models\npython train_sota_models.py\n\n# BNN Models\npython train_bnn_models.py\n```\n\n\nEvaluation\n--------\n- After model training, view the results in the `results` folder.\n\n\nVisualization\n---------\n- Run the visualization notebooks:\n```\njupyter notebook plot_survival_curves.ipynb\njupyter notebook plot_survival_time.ipynb\n```\n\n\nCitation\n--------\n```\n@inproceedings{lillelund_uncertainty_2023,\n  author={Lillelund, Christian Marius and Magris, Martin and Pedersen, Christian Fischer},\n  booktitle={2023 IEEE EMBS International Conference on Biomedical and Health Informatics (BHI)}, \n  title={Uncertainty Estimation in Deep Bayesian Survival Models}, \n  year={2023},\n  pages={1-4},\n  doi={10.1109/BHI58575.2023.10313466}\n}\n```\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "TensorFlow 2.x Bayesian Neural Network for Survival Analysis",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/thecml/UE-BNNSurv"
    },
    "split_keywords": [
        "deep learning",
        "neural network",
        "bayesian learning",
        "survival analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bec66ba1edf07f3a1497e7ff452f21d2af0171caa7b7e706480fe173f91abe49",
                "md5": "ae483b4c7cf7c61a1e9f6819b875d7aa",
                "sha256": "5e3186a0af3b657ebddb7ec99f3f0044d7fc97e576aa2e748dd08f0eb1f4ac68"
            },
            "downloads": -1,
            "filename": "bnnsurv-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ae483b4c7cf7c61a1e9f6819b875d7aa",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9594,
            "upload_time": "2023-11-17T13:33:29",
            "upload_time_iso_8601": "2023-11-17T13:33:29.895696Z",
            "url": "https://files.pythonhosted.org/packages/be/c6/6ba1edf07f3a1497e7ff452f21d2af0171caa7b7e706480fe173f91abe49/bnnsurv-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "59ee2148113cc2906e3bcd1759056ac59d59bf53e700a669c998f5c06dc6d122",
                "md5": "aeb4767e1eb9059c7351ac53c9f0208f",
                "sha256": "822843d59b73743d9d97865bc2782bac2092dac37ba85f787ec8175db6045a68"
            },
            "downloads": -1,
            "filename": "bnnsurv-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "aeb4767e1eb9059c7351ac53c9f0208f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10455,
            "upload_time": "2023-11-17T13:33:31",
            "upload_time_iso_8601": "2023-11-17T13:33:31.433668Z",
            "url": "https://files.pythonhosted.org/packages/59/ee/2148113cc2906e3bcd1759056ac59d59bf53e700a669c998f5c06dc6d122/bnnsurv-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-17 13:33:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thecml",
    "github_project": "UE-BNNSurv",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "bnnsurv"
}
        
Elapsed time: 0.14673s