Builds a description of a Bayes Net classifier stored in XML BIF 0.3 format.
For more details on XML BIF see:
Fabio Cozman, Marek Druzdzel, Daniel Garcia (1998). XML BIF version 0.3. URL http://www-2.cs.cmu.edu/~fgcozman/Research/InterchangeFormat/.
BibTeX:
@misc{Cozman1998,
author = {Fabio Cozman and Marek Druzdzel and Daniel Garcia},
title = {XML BIF version 0.3},
year = {1998},
URL = {http://www-2.cs.cmu.edu/~fgcozman/Research/InterchangeFormat/}
}
Sync(BayesNet other) synchronizes the node ordering of this Bayes network with
those in the other network (if possible).
void
buildInstances(Document doc, String sName) buildInstances parses the BIF document and creates a Bayes Net with its
nodes specified, but leaves the network structure and probability tables empty.
Parameters: doc - DOM document containing BIF document in DOM tree Parameters: sName - default name to give to the Bayes Net.
void
buildStructure(Document doc) buildStructure parses the BIF document in the DOM tree contained
in the doc parameter and specifies the the network structure and
probability tables.
getTechnicalInformation() Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
globalInfo() This will return a string describing the classifier.
public static void
main(String[] args) Loads the file specified as first parameter and prints it to stdout.
public int
missingArcs(BayesNet other) Count nr of arcs missing from other network compared to current network
Note that an arc is not 'missing' if it is reversed.
synchronizes the node ordering of this Bayes network with
those in the other network (if possible).
Parameters: other - Bayes network to synchronize with throws: Exception - if nr of attributes differs or not all of the variables have the same name.
buildInstances parses the BIF document and creates a Bayes Net with its
nodes specified, but leaves the network structure and probability tables empty.
Parameters: doc - DOM document containing BIF document in DOM tree Parameters: sName - default name to give to the Bayes Net. Will be overridden if specified in the BIF document. throws: Exception - if building fails
buildStructure parses the BIF document in the DOM tree contained
in the doc parameter and specifies the the network structure and
probability tables.
It assumes that buildInstances has been called before
Parameters: doc - DOM document containing BIF document in DOM tree throws: Exception - if building of structure fails
calculates the divergence between the probability distribution
represented by this network and that of another, that is,
\sum_{x\in X} P(x)log P(x)/Q(x)
where X is the set of values the nodes in the network can take,
P(x) the probability of this network for configuration x
Q(x) the probability of the other network for configuration x
Parameters: other - network to compare with divergence between this and other Bayes Network
Count nr of exta arcs from other network compared to current network
Note that an arc is not 'extra' if it is reversed.
Parameters: other - network to compare with nr of missing arcs
Returns all TEXT children of the given node in one string. Between
the node values new lines are inserted.
Parameters: node - the node to return the content for the content of the node
getNode finds the index of the node with name sNodeName
and throws an exception if no such node can be found.
Parameters: sNodeName - name of the node to get the index from index of the node with name sNodeName throws: Exception - if node cannot be found
Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
the technical information about this class
Count nr of arcs missing from other network compared to current network
Note that an arc is not 'missing' if it is reversed.
Parameters: other - network to compare with nr of missing arcs
processFile reads a BIFXML file and initializes a Bayes Net
Parameters: sFile - name of the file to parse the BIFReader throws: Exception - if processing fails