Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
ce8f692
changes done during setup
DhanushkiMapitigama Dec 11, 2023
e78226e
Merge pull request #1 from DhanushkiMapitigama/setup-changes
DhanushkiMapitigama Dec 11, 2023
6ec9c0f
Adding project infographics
EmaDulj Dec 11, 2023
eeef07d
Merge pull request #2 from EmaDulj/master
EmaDulj Dec 11, 2023
6eee1db
Update README.md
EmaDulj Dec 11, 2023
6c7fe27
Update README.md
EmaDulj Dec 11, 2023
03351ae
Delete docs/images/Project Infographics.jpg
EmaDulj Dec 11, 2023
80364c7
Adding infographics
EmaDulj Dec 11, 2023
0ed3b54
Rename Project Infographics.png to ProjectInfographics.png
EmaDulj Dec 11, 2023
897e12c
Update README.md
EmaDulj Dec 11, 2023
346e4ee
Merge pull request #3 from EmaDulj/master
EmaDulj Dec 11, 2023
050cec6
Update README.md
EmaDulj Dec 11, 2023
752823d
Merge pull request #4 from EmaDulj/master
EmaDulj Dec 11, 2023
4ac3fd9
Improving synergy
MinaBadri Dec 11, 2023
63e1abb
Weight Uncertainty in Bayesian Neural Networks
MinaBadri Dec 12, 2023
d5f6482
Bayesian config files
DhanushkiMapitigama Dec 12, 2023
35dc8b7
Merge pull request #6 from DhanushkiMapitigama/new_configs
DhanushkiMapitigama Dec 12, 2023
c10404c
Merge pull request #7 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Dec 12, 2023
32622d9
Changes for Unseen Drugs
MinaBadri Dec 12, 2023
75bf70d
Merge pull request #8 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Dec 13, 2023
fc371b6
implementation for Unseen data
MinaBadri Dec 14, 2023
410c461
Merge pull request #11 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Dec 14, 2023
5ab2004
active learning configs
MinaBadri Dec 15, 2023
2ef3dd4
Merge pull request #17 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Dec 15, 2023
a60f51a
restore the original contents
MinaBadri Dec 16, 2023
c0dd26b
config file for mixture Gaussian Bayesian
MinaBadri Dec 16, 2023
0e4f333
Dropout method On Nueral Network implementation
MinaBadri Dec 16, 2023
ba390e9
Merge pull request #21 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Dec 16, 2023
acc33b9
Merge pull request #22 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Dec 16, 2023
eb21e48
Implementing Sparse Variational Dropout on layers
MinaBadri Dec 17, 2023
714df81
Implementing Sparse Variational Dropout on layers
MinaBadri Dec 17, 2023
05e4748
Update README.md
MinaBadri Dec 17, 2023
8a3ffac
Update README.md
MinaBadri Dec 17, 2023
32dc146
Update README.md
MinaBadri Dec 17, 2023
633d715
Update README.md
MinaBadri Dec 17, 2023
ba936d5
minor changes
MinaBadri Dec 19, 2023
ffbc0e8
minor fix in functions
MinaBadri Dec 21, 2023
d956cc3
Update train.py
MinaBadri Dec 29, 2023
5cddba0
Update acquisition.py
MinaBadri Dec 29, 2023
e8ad304
Update active_learning_UCB_Bayesian.py
MinaBadri Dec 29, 2023
629d2ba
Update predictors.py
MinaBadri Dec 29, 2023
31a66f2
Adding EI and PI
MinaBadri Dec 29, 2023
8b29472
Update active_learning_UCB_Bayesian.py
MinaBadri Jan 2, 2024
4aa8dee
Update all configs for BNN
MinaBadri Jan 2, 2024
43f375d
Adding origin predictors
MinaBadri Jan 2, 2024
560f61c
Updating dropout class
MinaBadri Jan 4, 2024
b54f8bb
Update predictors.py
MinaBadri Jan 5, 2024
2bef1fb
Update model_evaluation_multi_cell_line.py
MinaBadri Jan 5, 2024
108b79c
Update model_evaluation_multi_cell_line_no_permut_invariance.py
MinaBadri Jan 5, 2024
1ad7f2f
Update model_evaluation_shuffled.py
MinaBadri Jan 5, 2024
158f3c5
changes to test results
MinaBadri Jan 5, 2024
c4e87a4
Merge branch 'weight_uncertainty' into ScaleMixtureGaussianBNN
MinaBadri Jan 5, 2024
a7b4273
Merge pull request #28 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Jan 5, 2024
73d57e9
changes for running tests
MinaBadri Jan 7, 2024
d0076b3
Merge branch 'weight_uncertainty' into ScaleMixtureGaussianBNN
MinaBadri Jan 7, 2024
98753c8
Merge pull request #29 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Jan 7, 2024
dd93e20
Update predictors.py
MinaBadri Jan 7, 2024
74105df
changed layers
MinaBadri Jan 7, 2024
b2837aa
Merge branch 'weight_uncertainty' into ScaleMixtureGaussianBNN
MinaBadri Jan 7, 2024
85076ac
Merge pull request #30 from MinaBadri/ScaleMixtureGaussianBNN
MinaBadri Jan 7, 2024
e95e999
Results
MinaBadri Jan 8, 2024
4a0ff1d
Small changes for running tests
MinaBadri Jan 8, 2024
b8dd45b
Merge branch 'weight_uncertainty' into ScaleMixtureGaussianBNN
MinaBadri Jan 8, 2024
23b1cf2
Update install.sh
MinaBadri Jan 18, 2024
d921a7a
Update requirements.txt
MinaBadri Jan 18, 2024
96f2ff5
Update install.sh
MinaBadri Jan 18, 2024
5cb9fc6
changes on kl
MinaBadri Mar 4, 2024
79ab428
Changes on Basic Bayesian model
MinaBadri Mar 4, 2024
1d8b837
changes to adopt both approach for prior
MinaBadri Mar 10, 2024
394c6e4
changes to adopt both approach for prior
MinaBadri Mar 10, 2024
157b5c2
Changing setting to accommodating single prior Bayesian
MinaBadri Mar 12, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
Reservoir
RayLogs
__pycache__
*pyc
*egg-info
.DS_Store
.DS_Store
47 changes: 29 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
# RECOVER: sequential model optimization platform for combination drug repurposing identifies novel synergistic compounds *in vitro*
# Machine Learning Driven Candidate Compound Generation for Drug Repurposing
Based on RECOVER: sequential model optimization platform for combination drug repurposing identifies novel synergistic compounds *in vitro*
[![DOI](https://zenodo.org/badge/320327566.svg)](https://zenodo.org/badge/latestdoi/320327566)

RECOVER is a platform that can guide wet lab experiments to quickly discover synergistic drug combinations active
against a cancer cell line, requiring substantially less screening than an exhaustive evaluation
([preprint](https://arxiv.org/abs/2202.04202)).
This repository is an implementation of RECOVER, a platform that can guide wet lab experiments to quickly discover synergistic drug combinations,
([preprint](https://arxiv.org/abs/2202.04202)), howerver instead of using an ensemble model to get Synergy predictions with uncertainty, we used multiple realization of a Bayesian Neural Network model.
Since the weights are drawn from a distribution, they differ for every run of a trained model and hence give different results. The goal was to get a more precise uncertainty and achieve i quicker since the model doesn't have to be trained multiple times.

<div>
<img src="docs/images/ProjectInfographics.png" alt="Overview" width="500"/>
</div>

![Overview](docs/images/overview.png "Overview")

## Environment setup
## Weighted Uncertainty in Bayesian Neural Networks
Incorporating weighted uncertainty into Bayesian Neural Networks (BNNs) enhances their predictive capabilities, allowing for a more nuanced understanding of model confidence. Inspired by the research outlined in the article, the implementation focused on introducing weighted uncertainty through a Bayesian framework. Implemetation is inspired by [bayes-by-backprop](https://github.com/nitarshan/bayes-by-backprop/tree/master)

### Implementation Details
1. **Layers Module:**
Implemented a versatile layers module within the `models/predictors.py` file, providing flexibility by incorporating both weighted uncertainty with and without dropout. Dropout method is inspired by [variational-dropout-sparsifies-dnn](https://github.com/bayesgroup/variational-dropout-sparsifies-dnn)

2. **Bayesian Neural Network:**
Extended the predictive capabilities by incorporating a Bayesian Neural Network into the `models/predictors.py` file. This empowers the model to leverage uncertainty information for more informed predictions.

3. **KL Loss Method:**
Implemented the Kullback-Leibler (KL) loss method, as suggested by the article, within the `models/predictors.py` file. This addition is crucial for training the Bayesian model effectively, ensuring convergence to a meaningful weight distribution.

**Requirements**: Anaconda (https://www.anaconda.com/) and Git LFS (https://git-lfs.github.com/). Please make sure
both are installed on the system prior to running installation.
4. **Configuration Files:**
Introduced configuration files tailored for the Bayesian basic trainer and active trainer in the `config` directory. These files capture the necessary settings for training Bayesian models, providing a clear and organized structure for experimentation.

**Installation**: enter the command `source install.sh` and follow the instructions. This will create a conda
environment named **recover** and install all the required packages including the
[reservoir](https://github.com/RECOVERcoalition/Reservoir) package that stores the primary data acquisition scripts.
5. **Codebase Modifications:**
Ensured seamless integration by making necessary adjustments in the `train.py` and `models/model.py` files. These modifications align the training process with the new Bayesian approach, allowing for the proper utilization of weighted uncertainty.

In case you have any issue with the installation procedure of the *reservoir*, you can access and download all files directly from this [google drive](https://drive.google.com/drive/folders/1MYeDoAi0-qnhSJTvs68r861iMOdoqYki?usp=share_link).
The implemented changes collectively enhance the expressiveness and reliability of the Bayesian Neural Network, paving the way for improved model interpretability and performance. By enabling weighted uncertainty, the model gains the ability to assign varying degrees of importance to different data points during training, ultimately leading to more robust and accurate predictions.
## Environment setup

**Requirements and Installation**:
For all the requirements and installation steps check th orginal RECOVER repository (https://github.com/RECOVERcoalition/Recover.git).

## Running the pipeline

Expand All @@ -31,9 +48,3 @@ For example, to run the pipeline with configuration from
the file `model_evaluation.py`, run `python train.py --config model_evaluation`.

Log files will automatically be created to save the results of the experiments.

## Note

This Recover repository is based on research funded by (or in part by) the Bill & Melinda Gates Foundation. The
findings and conclusions contained within are those of the authors and do not necessarily reflect positions or policies
of the Bill & Melinda Gates Foundation.
Binary file added docs/images/ProjectInfographics.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ pip install -U "ray[tune]"
pip install -e .

# Install rdkit
conda install -c rdkit rdkit
conda install conda-forge::rdkit

# Get Reservoir and install it in the environment (Git LFS NEEDED)
git clone git@github.com:RECOVERcoalition/Reservoir.git
git clone https://github.com/RECOVERcoalition/Reservoir.git
cd Reservoir/
python setup.py develop
cd ../
Expand Down
34 changes: 34 additions & 0 deletions recover/Experiments/cell_line_transfer.json

Large diffs are not rendered by default.

Loading