Skip to content

dhbrookes/Contrastive-Losses-Global-Epistasis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Code for NeurIPS 2024 paper "Contrastive losses as generalized models of global epistasis"

Overview

Contrastive-Losses-Global-Epistasis contains Python sourcecode for running the simulations discussed in the main text of "Contrastive losses as generalized models of global epistasis" by David Brookes, Jakub Otwinowski and Sam Sinai.

System Requirements

Contrastive-Losses-Global-Epistasis can be run on a standard computr. The code has been tested on a Linux (Debian GNU/Linus 11) system with Python 3.10.9. It has been tested with the following versions of Python dependencies:

  • torch (2.0.1)
  • matplotlib (3.7.1)
  • numpy (1.23.5)
  • pandas (1.5.3)
  • scipy (1.14.0)
  • tqdm (4.65.0)
  • sklearn (1.2.2)

Installation

To install from GitHub:

git clone https://github.com/dhbrookes/Contrastive-Losses-Global-Epistasis.git
cd Contrastive-Losses-Global-Epistasis

Contents

  • scripts/ contains self-contained Python scripts that run the simulations used in the paper.
    • scripts/run_complete_recovery_main_text.py runs the simulations whose results are shown in Figure 1.
    • scripts/run_mse_vs_bt_entropy.py runs the simulations whose results are shown in Figure 2b.
    • scripts/run_mse_vs_bt_train_size.py runs the simulations whose results are shown in Figure 2c.
  • results/ holds the output reports of simulations run in scripts/.
  • plotting.ipynb compiles simulation results and makes plots shown in main text.
  • simulation_utils.py contains a simple neural network implementation and other utilities useful for running the simulations.
  • sparsity_utils.py contains functions for performing Graph Fourier analyses of fitness functions.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published