Skip to content

undark-lab/torchns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

torchns

Nested sampling in torch

License: MIT arXiv

What is it?

torchns is a nested sampler with a slice sampling exploration scheme based on torch library. It is designed to be integrated with the swyft sequential simulation-based inference code.

Its main features are:

  • Vectorized evaluations of slice sampling chains to draw new live points.
  • Vectorized evaluations of the log-likelihood.
  • Functionality to define constrained prior regions, useful for sequential simulation-based inference applications.

Installation

  • Change directory to wherever you would like to store the library, then run:
git clone https://github.com/undark-lab/torchns.git # for https client
[or git clone git@github.com:undark-lab/torchns.git # for ssh client]
  • Making sure that the desired python environment is active, run the following installation code:
cd torchns/
pip install .
  • This will install torchns in the current python environment that is active on your system and will be available via import torchns

Further information

Release Details

Relevant other nested sampling packages

  • jaxns is a JAX based nested sampler.
  • proxnest implements the proximal nested sampling algorithm.
  • Polychord is a nested sampler that uses slice sampling.
  • MultiNest is a nested sampler that uses ellipsoidal sampling.
  • dynesty is a dynamic nested sampler.