8000 GitHub - Fuhsuann/BRW-simulation
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fuhsuann/BRW-simulation

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BRW-simulation

The aim of this project is to develop a faster (random) algorithm to approximate the Gibbs measure of a BRW.

Description of the Approximating Algorithm

Given a sample of the branching random walk of depth $N$, consider the following algorithm:

  1. start from the root
  2. consider the $2^M$ descendents of the root at level $M$
  3. choose one of the descendents according to a Gibbs measure with inverse temperature $\beta$ supported on these $2^M$ descendents
  4. set the chosen descendent as the new root and start from step 1.

The algorithm described above will generate a probability measure $\nu = \nu_{\beta,N,M}$ on the leaves on the BRW. We want to compare the algorithm with the Gibbs measure $\mu = \mu_{\beta,N}$ of the BRW. In fact, we want to show that with high probability, $$ \frac{1}{N}D_{KL}(\nu||\mu)\rightarrow 0, $$ as $N\rightarrow\infty$.

Scheme for parallel computation

  1. Sample all the agents starting from the same node together. After they reach the M-th descendants, they become independent. Then we can continue the parallel computation.
  2. Save the sampled weights on disk via h5py for example. To do this, we may need to represent the tree by key-value pairs.

Usages

Use python3 to execute the following programs:

  • KL_simulation.py simulates the trend of KL when we change the parameters
  • empirical.py simulates the empirical behavior of the algorithm described before.
  • empirical_parallel.py has the same purpose empirical.py but for N and M extremely large.

Dependencies

  • Numpy
  • Anytree: Node, PreOrderIter, LevelOrderIter, RenderTree
  • Multiprocessing: Pool, cpu_count
  • Matplotlib.pyplot

May require

  • h5py for saving the tree

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0