sfu-cl-lab / MLN_Generator

Code for converting a learned First-Order Bayesian Network to a Markov Logic Network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

MLN_Generator

Code for converting a learned First-Order Bayesian Network to a Markov Logic Network.

Input:

  • A relational database
  • A learned Bayesian network (using FactorBase).

Output:

A .mln file containing

  • Markov Logic Network formulas.
  • Weights for the formulas.

How to Use

  1. First import data into your database and run FactorBase.
  2. Set up a configuration file as for running FactorBase. If you use MLNExporter after Factorbase, you can just keep the same configuration file.
  3. Convert the learned BN into MLN by running java -jar MLNExporter.jar .

Our conversion method follows the moralization method of Domingos and Richardson; see also the Alchemy FAQ.

Notes and Limitations

Currently we add unit clauses as recommended by Domingos and Richardson at the bottom of the file. (e.g. RA(Student, Prof)). We do not output weights for the unit clauses.

  • If you want an MLN structure with weights assigned to each formula, delete the unit clauses.
  • If you want an MLN structure without weights, leave the unit clauses, and delete the weights.

About

Code for converting a learned First-Order Bayesian Network to a Markov Logic Network


Languages

Language:Java 99.7%Language:SQLPL 0.3%