public class MarginCalculator extends Object implements Serializable, RevisionHandler
Modifier and Type | Class and Description |
---|---|
class |
MarginCalculator.JunctionTreeNode |
class |
MarginCalculator.JunctionTreeSeparator |
Modifier and Type | Field and Description |
---|---|
MarginCalculator.JunctionTreeNode |
m_root |
Constructor and Description |
---|
MarginCalculator() |
Modifier and Type | Method and Description |
---|---|
void |
calcFullMargins(BayesNet bayesNet) |
void |
calcMargins(BayesNet bayesNet)
Calc marginal distributions of nodes in Bayesian network
Note that a connected network is assumed.
|
boolean[][] |
fillIn(int[] order,
boolean[][] bAdjacencyMatrix)
Apply Tarjan and Yannakakis (1984) fill in algorithm for graph
triangulation.
|
double[] |
getMargin(int iNode) |
int |
getNode(String sNodeName) |
String |
getRevision()
Returns the revision string.
|
static void |
main(String[] args) |
boolean[][] |
moralize(BayesNet bayesNet)
moralize DAG and calculate
adjacency matrix representation for a Bayes Network, effecively
converting the directed acyclic graph to an undirected graph.
|
void |
process(boolean[][] bAdjacencyMatrix,
BayesNet bayesNet) |
void |
setEvidence(int nNode,
int iValue) |
String |
toString() |
String |
toXMLBIF03() |
public MarginCalculator.JunctionTreeNode m_root
public int getNode(String sNodeName)
public String toXMLBIF03()
public void calcMargins(BayesNet bayesNet) throws Exception
bayesNet
- Exception
public void process(boolean[][] bAdjacencyMatrix, BayesNet bayesNet) throws Exception
Exception
public boolean[][] moralize(BayesNet bayesNet)
bayesNet:
- Bayes Network to processpublic boolean[][] fillIn(int[] order, boolean[][] bAdjacencyMatrix)
order:
- node orderingbAdjacencyMatrix:
- boolean matrix representing the graphpublic double[] getMargin(int iNode)
public String getRevision()
getRevision
in interface RevisionHandler
public static void main(String[] args)
Copyright © 2019 University of Waikato, Hamilton, NZ. All rights reserved.