These files in this project  are based on [https://bitbucket.org/bmmalone/urlearning-cpp/src/master/]  witten by Brandon Malone. Many thanks to him.

**install**
This package requires [Boost](http://www.boost.org/). Please see the boost documentation and [https://bitbucket.org/bmmalone/urlearning-cpp/src/master/].

**usage**

**Calculating local score**

The local score is calculated by the "score" program. It can be built with a command like:
"./build.py score --create-symlink"

The scores are then calculated from csv files and stored in [pss files](http://urlearning.org/PSS-Keywords.odf) with a command like:

"score iris.csv iris.pss iris.mi"

The ``score`` program treats each column as a categorical discrete variable, and each unique string is treated as a separate categorical value. In particular, the program *does not* perform any sort of discretization, normalization, etc. Furthermore, it *does not* remove records with missing values. String like "?", "NA", etc., will simply be treated as other categories for the variables for which they appear. Thus, it is likely custom preprocessing scripts will be necessary before using the ``score`` program.

Please use ``score --help`` to see options such as changing the scoring function and setting a limit on the maximum parent set size.

**variable selection**

Conducting variable selection using Bayes factor is calculated from "Bayes_factor" program. It can be built with a command like:
"./build.py Bayes_factor --create-symlink"

The Bayes_factor are the calculated from csv files and stored the result as ".bf file"
"Bayes_factor iris.csv iris.bf"

**Learning the structre**

Once the scores are available, the learning algorithms can be used to learn the optimal structures. The package includes two structure learning algorithms:

* "bfs"
* "dfbnb"

They are built as shown above.

he algorithms are called passing in a pss file, and they output relevant information, such as nodes expanded, timing information, etc. If desired, the ``-n`` option can be used to save the learned network in the Hugin network file format. An example using the astar command is:

"bfs iris.pss iris -n iris.net"
"dfbnb iris.pss iris.bf iris -n iris.net"

The ``--help`` command line option will show more information about each program. For example:

``bfs --help``.


