项目作者: FirstHandScientist

项目描述 :
Alpha Belief Propagation
高级语言: Python
项目地址: git://github.com/FirstHandScientist/AlphaBP.git
创建时间: 2020-06-26T12:08:43Z
项目社区:https://github.com/FirstHandScientist/AlphaBP

开源协议:

下载


Alpha Belief Propagation

Code for our paper: $\alpha$ Belief Propagation for Approximate Inference

Environment

Create a virtual environment with a python2 interpreter at ‘path/to/your/evn/‘

  1. $ virtualenv -p python2.7 pyenv27

(Here python2.7 is required due to src/factorgraph.py was developed in python2.7)
Then activate your environment:

  1. $ source path/to/your/evn/pyenv27/bin/activate

and install the requirement file:

  1. $ pip install -r requirements.txt

Experiments

For the sufficient condition check in ER random graph, run

  1. $ python bin/contract_condition.py

For message change along with iteration numbers, to see case of no convergence

  1. $ python bin/converge_rate 0.5 false

For message change along with iteration numbers, to see case with convergence

  1. $ python bin/converge_rate 0.1 true

For application of alpha-bp, run

  1. $ python bin/alpha_compare.py

for experiments without prior.

For application with mmse prior, run

  1. $ python bin/alpha_compare_mmse.py