Skip to content
opcode81 edited this page May 9, 2013 · 4 revisions

blnquery

The BLN Query Tool

The BLN Query Tool is a convenient interface for inference in Bayesian logic networks: You select the the model components, have the option to edit them and specify the parameters of the inference task. All settings, and even context-specific data is saved, such that you can resume a query session at any time.

Editors

The tool lets you choose the BLN fragment network, which you can edit using the "show" button (this starts the Network Editor with the currently selected fragment network).

The tool furthermore features integrated text editors for the following files:

  • the model declarations file
  • the logic description file
  • the evidence database

If you modify a file in the internal editor, it will automatically be saved as soon as you invoke the learning or inference method (or as soon as you press the respective ''save'' button). The new content can either be saved to the same file (overwriting the old content) or a new file, which you can choose to name as desired.

'''Context-specific data''': When performing inference, one typically associates a particular query with each evidence database, so the query tool specifically remembers the query you made for each evidence database and restores it whenever you change back to the evidence database.

Given these inputs one can choose an Inference Methods and infer the values of the variables stated a comma-separated list of queries, where a query can be any one of the following:

  • a ground atom, e.g. foobar(X,Y)
  • the name of a predicate, e.g. foobar

Inference Parameters =

  • the maximum steps of the chosen inference method
  • the interval after how many steps progress information shall be printed
  • the possibility to set a time limit for the inference method with status report every s seconds.
  • the possibility to define closed world (CW) predicates. Note that predicates defined in Prolog don't need to be set as CW predicates.
  • the possibility to save the inferred distributions for later comparison.
  • the possibility to compare the inferred distribution to a reference distribution.

Additional parameters

An incomplete list of parameters that can be specified in the ''Add. Params'' input:

  • the option to define the the maximum number of trials per step for BN sampling algorithms (Add.Parameter: -maxTrials n)
  • the option to show the the created ground network in BNJ editor (Add. Parameter -s)
  • the option to save the created ground network (Add. Parameter -si)
  • the option to remove deterministic CPT columns by replacing 0s with low probability values (Add. Parameter -nodetcpt)

Running Inference

Once all the settings have been made, press the ''Inference'' button. While the actual algorithm is running, the tool window itself will be hidden as long as the job is running, while the output of the algorithm is written to the console for you to follow. At the beginning, the tools list the main input parameters for your convenience, and, at the end, the query tool additionally outputs the inference results to the console.

Clone this wiki locally