类 BIFReader

所有已实现的接口:
Serializable, Cloneable, AdditionalMeasureProducer, CapabilitiesHandler, Drawable, OptionHandler, RevisionHandler, TechnicalInformationHandler, WeightedInstancesHandler

public class BIFReader extends BayesNet implements TechnicalInformationHandler
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/}
 }
 

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
 
版本:
$Revision: 1.15 $
作者:
Remco Bouckaert (rrb@xm.co.nz)
另请参阅:
  • 构造器详细资料

    • BIFReader

      public BIFReader()
      the default constructor
  • 方法详细资料

    • globalInfo

      public String globalInfo()
      This will return a string describing the classifier.
      覆盖:
      globalInfo 在类中 BayesNet
      返回:
      The string.
    • processFile

      public BIFReader processFile(String sFile) throws Exception
      processFile reads a BIFXML file and initializes a Bayes Net
      参数:
      sFile - name of the file to parse
      返回:
      the BIFReader
      抛出:
      Exception - if processing fails
    • processString

      public BIFReader processString(String sStr) throws Exception
      抛出:
      Exception
    • getFileName

      public String getFileName()
      returns the current filename
      返回:
      the current filename
    • getTechnicalInformation

      public 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.
      指定者:
      getTechnicalInformation 在接口中 TechnicalInformationHandler
      返回:
      the technical information about this class
    • Sync

      public void Sync(BayesNet other) throws Exception
      synchronizes the node ordering of this Bayes network with those in the other network (if possible).
      参数:
      other - Bayes network to synchronize with
      抛出:
      Exception - if nr of attributes differs or not all of the variables have the same name.
    • getContent

      public String getContent(Element node)
      Returns all TEXT children of the given node in one string. Between the node values new lines are inserted.
      参数:
      node - the node to return the content for
      返回:
      the content of the node
    • missingArcs

      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.
      参数:
      other - network to compare with
      返回:
      nr of missing arcs
    • extraArcs

      public 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.
      参数:
      other - network to compare with
      返回:
      nr of missing arcs
    • divergence

      public 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
      参数:
      other - network to compare with
      返回:
      divergence between this and other Bayes Network
    • reversedArcs

      public int reversedArcs(BayesNet other)
      Count nr of reversed arcs from other network compared to current network
      参数:
      other - network to compare with
      返回:
      nr of missing arcs
    • getNode

      public int getNode(String sNodeName) throws Exception
      getNode finds the index of the node with name sNodeName and throws an exception if no such node can be found.
      参数:
      sNodeName - name of the node to get the index from
      返回:
      index of the node with name sNodeName
      抛出:
      Exception - if node cannot be found
    • getRevision

      public String getRevision()
      Returns the revision string.
      指定者:
      getRevision 在接口中 RevisionHandler
      覆盖:
      getRevision 在类中 BayesNet
      返回:
      the revision
    • main

      public static void main(String[] args)
      Loads the file specified as first parameter and prints it to stdout.
      参数:
      args - the command line parameters