public class BIFReader extends BayesNet implements TechnicalInformationHandler
@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/}
}
Valid options are:
-D Do not use ADTree data structure
-B <BIF file> BIF file to compare with
-Q weka.classifiers.bayes.net.search.SearchAlgorithm Search algorithm
-E weka.classifiers.bayes.net.estimate.SimpleEstimator Estimator algorithm
m_Distributions, m_InstancesBATCH_SIZE_DEFAULT, NUM_DECIMAL_PLACES_DEFAULTBayesNet, Newick, NOT_DRAWABLE, TREE| Constructor and Description |
|---|
BIFReader()
the default constructor
|
| Modifier and Type | Method and Description |
|---|---|
double |
divergence(BayesNet other)
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
|
int |
extraArcs(BayesNet other)
Count nr of exta arcs from other network compared to current network Note
that an arc is not 'extra' if it is reversed.
|
java.lang.String |
getContent(org.w3c.dom.Element node)
Returns all TEXT children of the given node in one string.
|
java.lang.String |
getFileName()
returns the current filename
|
int |
getNode(java.lang.String sNodeName)
getNode finds the index of the node with name sNodeName and throws an
exception if no such node can be found.
|
java.lang.String |
getRevision()
Returns the revision string.
|
TechnicalInformation |
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.
|
java.lang.String |
globalInfo()
This will return a string describing the classifier.
|
static void |
main(java.lang.String[] args)
Loads the file specified as first parameter and prints it to stdout.
|
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.
|
BIFReader |
processFile(java.lang.String sFile)
processFile reads a BIFXML file and initializes a Bayes Net
|
BIFReader |
processString(java.lang.String sStr) |
int |
reversedArcs(BayesNet other)
Count nr of reversed arcs from other network compared to current network
|
void |
Sync(BayesNet other)
synchronizes the node ordering of this Bayes network with those in the
other network (if possible).
|
BIFFileTipText, buildClassifier, buildStructure, countsForInstance, distributionForInstance, enumerateMeasures, estimateCPTs, estimatorTipText, getADTree, getBIFFile, getBIFHeader, getCapabilities, getCardinality, getDistributions, getEstimator, getMeasure, getName, getNodeName, getNodeValue, getNrOfNodes, getNrOfParents, getNumInstances, getOptions, getParent, getParentCardinality, getParentSet, getParentSets, getProbability, getSearchAlgorithm, getUseADTree, graph, graphType, initCPTs, initStructure, listOptions, measureAICScore, measureBayesScore, measureBDeuScore, measureDivergence, measureEntropyScore, measureExtraArcs, measureMDLScore, measureMissingArcs, measureReversedArcs, partitionOptions, searchAlgorithmTipText, setBIFFile, setEstimator, setOptions, setSearchAlgorithm, setUseADTree, toString, toXMLBIF03, updateClassifier, useADTreeTipTextbatchSizeTipText, classifyInstance, debugTipText, distributionsForInstances, doNotCheckCapabilitiesTipText, forName, getBatchSize, getDebug, getDoNotCheckCapabilities, getNumDecimalPlaces, implementsMoreEfficientBatchPrediction, makeCopies, makeCopy, numDecimalPlacesTipText, postExecution, preExecution, run, runClassifier, setBatchSize, setDebug, setDoNotCheckCapabilities, setNumDecimalPlacesequals, getClass, hashCode, notify, notifyAll, wait, wait, waitmakeCopypublic java.lang.String globalInfo()
globalInfo in class BayesNetpublic BIFReader processFile(java.lang.String sFile) throws java.lang.Exception
sFile - name of the file to parsejava.lang.Exception - if processing failspublic BIFReader processString(java.lang.String sStr) throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String getFileName()
public TechnicalInformation getTechnicalInformation()
getTechnicalInformation in interface TechnicalInformationHandlerpublic void Sync(BayesNet other) throws java.lang.Exception
other - Bayes network to synchronize withjava.lang.Exception - if nr of attributes differs or not all of the variables
have the same name.public java.lang.String getContent(org.w3c.dom.Element node)
node - the node to return the content forpublic int missingArcs(BayesNet other)
other - network to compare withpublic int extraArcs(BayesNet other)
other - network to compare withpublic double divergence(BayesNet other)
other - network to compare withpublic int reversedArcs(BayesNet other)
other - network to compare withpublic int getNode(java.lang.String sNodeName)
throws java.lang.Exception
sNodeName - name of the node to get the index fromjava.lang.Exception - if node cannot be foundpublic java.lang.String getRevision()
getRevision in interface RevisionHandlergetRevision in class BayesNetpublic static void main(java.lang.String[] args)
args - the command line parameters