Git Product home page Git Product logo

bnc_sdd's Introduction

BNC_SDD

Converts a Bayesian Network Classifier (BNC) into a Sentential Decision Diagram (SDD) by first compiling an Ordered Decision Diagram (ODD) and then converting the ODD into a SDD. The algorithm is described in the following paper:

Compiling Bayesian Networks into Decision Graphs
In Proceedings of the Thirty-Third AAAI Conference on Artificial Intelligence (AAAI), 2019
Andy Shih, Arthur Choi, Adnan Darwiche

Input Format

The input BNC is specified using "config.json". It should have a JSON object with the following fields:

  • "id": some number to help you distinguish the compilation task
  • "name": name of the .net or the .uai Bayesian Network file
  • "filetype": filetype of the Bayesian Network file (either ".net" or ".uai")
  • "vars": number of feature variables
  • "root": class node of the Bayesian Network Classifier
  • "leaves": a list of the feature variables. If empty, defaults to all leaves of the Bayesian Network. If not empty, length should match "vars"
  • "threshold": threshold of the Bayesian Network Classifier
  • "input_filepath": filepath of the Bayesian Network file
  • "output_filepath": filepath to write the output ODD and SDD

The underlying Bayesian Network of the BNC is specified as a .net file or a .uai file. The file that will be looked up is config["input_filepath"] + config["name"] + "." + config["filetype"]. For example, if the filepath of the network file is at "networks/binarynetworks/admission.net", then we set config["input_filepath"]: "networks/binarynetworks/", config["name"]: "admission", and config["filetype"]: "net".

Assumptions

The underlying Bayesian Network should be completely binary (all interal nodes and leaves are binary). Furthermore, there should be no hard CPTs (no 0/1 values in CPTS).

Output Format

The output of the program will be 4 files:

  • ODD file: The ODD representation of the decision function of the BNC
  • SDD file: The SDD representation of the decision function of the BNC
  • vtree file: The vtree accompanying the SDD
  • variable description file: A description of the variables of the ODD/SDD (includes variable order, metadata)

The ODD file will be written at config["output_filepath"] + config["name"] + "_" + config["id"] + ".odd"

The SDD file will be written at config["output_filepath"] + config["name"] + "_" + config["id"] + ".sdd"

The vtree file will be written at config["output_filepath"] + config["name"] + "_" + config["id"] + ".vtree"

The variable description file will be written at config["output_filepath"] + config["name"] + "_" + config["id"] + ".txt"

Running BNC_SDD

./run

Further Questions

Contact us at

Andy Shih: [email protected]
Arthur Choi: [email protected]
Adnan Darwiche: [email protected]

bnc_sdd's People

Contributors

andyshih12 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.