Skip to content

TUmasters/gen-bn

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

gen-bn

Generates random probabilistic networks with Bernoulli random variables.

Requirements

Python 3, numpy, (optional) networkx, matplotlib

Usage

See

./gen-bn --help

for information on parameters to the generator.

Output format

The network is written by default to bn.json, with the following format:

{
  <node_id>: {
    "parents": [...]
    "prob": [
       [<assignment>, <probability>]
       ...
    ]
  },
  ...
}

where:

  • <node_id> is the numeric identifier for a variable.
  • parents has a list of variables that <node_id> depends on.
  • prob has a list of conditional probabilities such that P(<node_id>=1|<parents>=<assignment>)=<probability>. In other words, it has the list of probabilities of success for the Bernoulli random variable based on every configuration of its parents.

About

Simple generator for probabilistic networks.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages