Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

This repository contains a Bayesian Neural Network (BNN) based analysis tool for biological network inference that can be used with various datasets. It is programmed in Python along with the torch, torchbnn, pandas, scikit-learn, and matplotlib libraries.

License

NotificationsYou must be signed in to change notification settings

peterajhgraham/BNN_Biological_Network_Inference

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This BNN BNI Analysis Tool can be used for predictive insight in Biological Networks through the use of Bayesian Neural Networks. This repository can be used for any biological datasets, however it is tailored toward individuals who are interested in neural networks/neural computation, computational biology, computational systems biology, computational genomics, computational pharmacology, and computational neuroscience. It is also made just as available to anyone who would like to use it for their own learning endeavours or to start their journey in any of these fields!

Directory Structure

BNN_Biological_Network_Inference/├── data/│   └── example_data.csv│├── src/│   ├── data_preprocessing.py│   ├── train.py│   ├── inference.py│   └── utils.py│├── .gitignore├── LICENSE├── requirements.txt└── README.md

Example Databases

Data Structure

Your.csv files should follow this structure:

  1. Features: Columns representing various features.
  2. Target Variable: A column for the target variable that represents the interaction score or outcome you want to predict.

Example Structure:

feature1,feature2,feature3,target

value1,value2,value3,target_value

Instructions

1. Prepare Your Data

  • Copy The Repository:
git clone https://github.com/peterajhgraham/BNN_Biological_Network_Inference.gitcd BNN_Biological_Network_Inference
  • Format Your Data: Ensure your.csv files follow the structure outlined above.

  • Place Data Files: Save your.csv files in thedata/ directory of the repository.

2. Install Required Packages

Install the required Python packages listed inrequirements.txt:

pip install -r requirements.txt

3. Preprocess Data

Run the data preprocessing script to load and prepare your data for modeling:

fromsrc.data_preprocessingimportload_data,preprocess_datafile_paths= {'example':'data/example_data.csv'}data=load_data(file_paths)processed_data=preprocess_data(data)

4. Train the Model

Use the training script to build and train your Bayesian Neural Network model with torchbnn:

fromsrc.trainimporttrain_modelinput_dim=processed_data['example'][0].shape[1]# Example for one datasetmodel=train_model(*processed_data['example'],input_dim)

5. Make Predictions

After training, use the inference script to make predictions with your model:

fromsrc.inferenceimportinferpredictions=infer(model,processed_data['example'][1])

6. Visualize Results

You can use the utility functions to visualize your results:

fromsrc.utilsimportplot_predictionsplot_predictions(processed_data['example'][2],predictions)

About

This repository contains a Bayesian Neural Network (BNN) based analysis tool for biological network inference that can be used with various datasets. It is programmed in Python along with the torch, torchbnn, pandas, scikit-learn, and matplotlib libraries.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp