Algorithms

In general, we support two broad classes of structure learning algorithms.

  • Constraint Based (CB)

  • Search-and-Scoring (SS)

The CB algorithms that we support are as follows.

  • Naive Bayes (NB)

  • BN Augmented Naive Bayes (BAN)

  • Tree Augmented Networks (TAN)

  • Maximum Weight Spanning Tree (MWST)

  • Three Phase Dependency Analysis (TPDA)

  • PC Algorithm (PC)

For SS algorithms, we use genetic algorithms (GA) as the framework finding the best networks.

The NB and BAN algorithms are used to learn classifier BBNs, while all other algorithms are general purpose. For NB and BAN, the --clazz` argument specifies the variable that is considered to be the class variable. The --cmi argument stands for conditional mutual information and denotes the value above which conditional independence tests will be considered conditionally dependent. The example JSON below gives you an idea of what to pass in with your data to fine-tune the learning algorithms.

NB

1{
2    "learn": {
3        "model_id": "toy_example_v0.0.1",
4        "algorithm": "naive_bayes",
5        "inputs": {
6            "--clazz": "c"
7        }
8    }
9}

BAN

 1{
 2    "learn": {
 3        "model_id": "toy_example_v0.0.1",
 4        "algorithm": "ban",
 5        "inputs": {
 6            "--clazz": "c",
 7            "--cmi": 0.06,
 8            "--method": "tpda"
 9        }
10    }
11}

TAN

1{
2    "learn": {
3        "model_id": "toy_example_v0.0.1",
4        "algorithm": "tan",
5        "inputs": {
6            "--cmi": 0.06
7        }
8    }
9}

MWST

1{
2    "learn": {
3        "model_id": "toy_example_v0.0.1",
4        "algorithm": "tpda",
5        "inputs": {
6            "--cmi": 0.06
7        }
8    }
9}

TPDA

1{
2    "learn": {
3        "model_id": "toy_example_v0.0.1",
4        "algorithm": "tpda",
5        "inputs": {
6            "--cmi": 0.06
7        }
8    }
9}

PC

1{
2    "learn": {
3        "model_id": "toy_example_v0.0.1",
4        "algorithm": "pc",
5        "inputs": {
6            "--cmi": 0.06
7        }
8    }
9}

GA

 1{
 2    "learn": {
 3        "model_id": "toy_example_v0.0.1",
 4        "algorithm": "ga",
 5        "inputs": {
 6            "--max-parents": 4,
 7            "--mutation-rate": 0.25,
 8            "--pop_size": 100,
 9            "--crossover-prob": 0.5,
10            "--max-iters": 20,
11            "--convergence-threshold": 3,
12            "--ordering": "mwst"
13        }
14    }
15}