|
1
|
- Chris H. Meyer
- (revised by William H. Hsu)
- Kansas State University
- KDD Laboratory
- http://www.kddresearch.org
- http://bndev.sourceforge.net
|
|
2
|
- Introduction
- Inference Tutorial
- Learning Tutorial
- Coding the Wizards
|
|
3
|
- Offers many new tools in GUI form
- This lecture will focus on the Inference and Learning Wizards
- We will also look at components such as evidence, CPT tables, and
algorithms behind learning
|
|
4
|
- Introduction
- Inference Tutorial
- Learning Tutorial
- Coding the Wizards
|
|
5
|
- Select
- Tools ŕ
- Inference
Wizard
|
|
6
|
|
|
7
|
|
|
8
|
- L-S Algorithm contains 2 main steps:
- Creates a tree of cliques (junction tree) from the Bayesian Network
- Computes probability of cliques, then single-node properties are formed
based on probability of cliques
|
|
9
|
|
|
10
|
- Variable Elimination
- Uses confactors and the VE algorithm instead of trees
- Loop Cutset
- Finds minimum cutsets of probability in Bayesian Networks and computes
probability from the cutsets
|
|
11
|
- Pearl’s Propagation
- Uses message-passing as data from 1 vertex propagates to all neighbors,
then to neighbor’s neighbors, etc…
- All algorithms are useful in the correct circumstance, but full
explanation is not in the scope of this lecture
|
|
12
|
- Approximate Inference
- Logic Sampling, Forward Sampling, Likelihood Weighting, Self-Importance
Sampling, Adaptive-Importance Sampling, Pearl MCMC Method, Chavez MCMC
Method
- Again, all algorithms are useful in the correct circumstance
- Output your data to chosen file on completion
|
|
13
|
- Introduction
- Inference Tutorial
- Learning Tutorial
- Coding the Wizards
|
|
14
|
|
|
15
|
|
|
16
|
- Select your Learning Algorithm
- K2, Genetic Algorithm Wrapper for K2 (GAWK), Genetic Algorithm on
Structure, Greedy Structure Learning, Standard Hill-Climbing,
Hill-Climbing with adversarial reweighting, Hill-Climbing with
Dirichlet prior, Simulated Annealing, Stochastic structural learning
|
|
17
|
- Depending on user’s desire, different learning algorithms will prove to
be more effective
- Output results to file with desired ordering
|
|
18
|
- Introduction
- Inference Tutorial
- Learning Tutorial
- Coding the Wizards
|
|
19
|
- GUI
- Main GUI window passed as owner of InferenceWizard.java
- All Buttons, JButtons, JRadioButtons, etc. are added to
InferenceWizard.java’s ActionListener(actionEvent e) method
|
|
20
|
- Secondary Windows
- Built using BNJFileDialogFactory class
- GUI = First 500 lines of code for InferenceWizard.java
- Main Brain = Last 100 lines of code
|
|
21
|
- Approximate Inference is slightly more complicated ŕ
|
|
22
|
- JTree, DefaultTreeModel, and InferenceResult are used for inference
calculation
- These are found in javax.swing.tree.* and edu.ksu.cis.bnj.bbn.inference.*
|
|
23
|
- Inference.getMarginals() returns an InferenceResult, which contains keys
used for enumeration
- InferenceWizard parses all nodes, and adds them to a DefaultTreeModel.
- On completion of parsing, the JTree is updated with this model
|
|
24
|
- JPanel is created upon model completion for results
|
|
25
|
- GUI
- Almost exactly the same as InferenceWizard.java, except…
- Database functionality has been implemented
- Currently supports Oracle, MySQL, and PostgreSQL
|
|
26
|
- Except for Database methods, connect() and disconnect(), the Learning
Wizard is basically a mirror of the Inference Wizard
- GUI = First 400 lines of code for LearningWizard.java
- Main Brain = Last 30 lines of code
|
|
27
|
- Key element of LearningWizard.java = Learner
- Imported from edu.ksu.cis.bnj.bbn.learning.*
- Learner is then instantiated with the selected algorithm and data as
parameters
- learner = Learner.load(learningEngines[selectedAlgorithm][1], data);
- Or
- learner = new PRMk2((Database) data, null);
|
|
28
|
- Learned graph is returned via
- Learner.getGraph()
- This statement returns a BBNGraph suitable for viewing
- Check edu.ksu.cis.bnj.bbn.learning.* for algorithm explanations
|