Java Doc for BIFReader.java in  » Science » weka » weka » classifiers » bayes » net » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Science » weka » weka.classifiers.bayes.net 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


weka.classifiers.bayes.BayesNet
   weka.classifiers.bayes.net.BIFReader

BIFReader
public class BIFReader extends BayesNet implements TechnicalInformationHandler(Code)
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
 

author:
   Remco Bouckaert (rrb@xm.co.nz)
version:
   $Revision: 1.11 $


Field Summary
 Stringm_sFile
    
final static  longserialVersionUID
    

Constructor Summary
public  BIFReader()
    

Method Summary
public  voidSync(BayesNet other)
     synchronizes the node ordering of this Bayes network with those in the other network (if possible).
 voidbuildInstances(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.
 voidbuildStructure(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.
public  doubledivergence(BayesNet other)
    
public  intextraArcs(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.
public  StringgetContent(Element node)
     Returns all TEXT children of the given node in one string.
 ElementgetDefinition(Document doc, String sName)
    
public  StringgetFileName()
    
public  intgetNode(String sNodeName)
     getNode finds the index of the node with name sNodeName and throws an exception if no such node can be found.
 FastVectorgetParentNodes(Node definition)
    
 StringgetTable(Node definition)
    
public  TechnicalInformationgetTechnicalInformation()
     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.
public  StringglobalInfo()
     This will return a string describing the classifier.
public static  voidmain(String[] args)
     Loads the file specified as first parameter and prints it to stdout.
public  intmissingArcs(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.
public  BIFReaderprocessFile(String sFile)
    
public  intreversedArcs(BayesNet other)
    
 NodeListselectAllNames(Document doc)
    
 NodeListselectAllVariables(Document doc)
    
 FastVectorselectElements(Node item, String sElement)
    
 FastVectorselectName(Node item)
    
 FastVectorselectOutCome(Node item)
    
 FastVectorselectProperty(Node item)
    

Field Detail
m_sFile
String m_sFile(Code)
the current filename



serialVersionUID
final static long serialVersionUID(Code)
for serialization




Constructor Detail
BIFReader
public BIFReader()(Code)
the default constructor




Method Detail
Sync
public void Sync(BayesNet other) throws Exception(Code)
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
void buildInstances(Document doc, String sName) throws Exception(Code)
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
void buildStructure(Document doc) throws Exception(Code)
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



divergence
public double divergence(BayesNet other)(Code)
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



extraArcs
public int extraArcs(BayesNet other)(Code)
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



getContent
public String getContent(Element node)(Code)
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



getDefinition
Element getDefinition(Document doc, String sName) throws Exception(Code)



getFileName
public String getFileName()(Code)
returns the current filename the current filename



getNode
public int getNode(String sNodeName) throws Exception(Code)
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



getParentNodes
FastVector getParentNodes(Node definition) throws Exception(Code)



getTable
String getTable(Node definition) throws Exception(Code)



getTechnicalInformation
public TechnicalInformation getTechnicalInformation()(Code)
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



globalInfo
public String globalInfo()(Code)
This will return a string describing the classifier. The string.



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



missingArcs
public int missingArcs(BayesNet other)(Code)
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
public BIFReader processFile(String sFile) throws Exception(Code)
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



reversedArcs
public int reversedArcs(BayesNet other)(Code)
Count nr of reversed arcs from other network compared to current network
Parameters:
  other - network to compare with nr of missing arcs



selectAllNames
NodeList selectAllNames(Document doc) throws Exception(Code)



selectAllVariables
NodeList selectAllVariables(Document doc) throws Exception(Code)



selectElements
FastVector selectElements(Node item, String sElement) throws Exception(Code)



selectName
FastVector selectName(Node item) throws Exception(Code)



selectOutCome
FastVector selectOutCome(Node item) throws Exception(Code)



selectProperty
FastVector selectProperty(Node item) throws Exception(Code)



Fields inherited from weka.classifiers.bayes.BayesNet
public Estimator[][] m_Distributions(Code)(Java Doc)
public Instances m_Instances(Code)(Java Doc)
protected int m_NumClasses(Code)(Java Doc)
protected ParentSet[] m_ParentSets(Code)(Java Doc)
protected BIFReader m_otherBayesNet(Code)(Java Doc)

Methods inherited from weka.classifiers.bayes.BayesNet
public String BIFFileTipText()(Code)(Java Doc)
public void buildClassifier(Instances instances) throws Exception(Code)(Java Doc)
public void buildStructure() throws Exception(Code)(Java Doc)
public double[] countsForInstance(Instance instance) throws Exception(Code)(Java Doc)
public double[] distributionForInstance(Instance instance) throws Exception(Code)(Java Doc)
public Enumeration enumerateMeasures()(Code)(Java Doc)
public void estimateCPTs() throws Exception(Code)(Java Doc)
public String estimatorTipText()(Code)(Java Doc)
public ADNode getADTree()(Code)(Java Doc)
public String getBIFFile()(Code)(Java Doc)
public Capabilities getCapabilities()(Code)(Java Doc)
public int getCardinality(int iNode)(Code)(Java Doc)
public Estimator[][] getDistributions()(Code)(Java Doc)
public BayesNetEstimator getEstimator()(Code)(Java Doc)
public double getMeasure(String measureName)(Code)(Java Doc)
public String getName()(Code)(Java Doc)
public String getNodeName(int iNode)(Code)(Java Doc)
public String getNodeValue(int iNode, int iValue)(Code)(Java Doc)
public int getNrOfNodes()(Code)(Java Doc)
public int getNrOfParents(int iNode)(Code)(Java Doc)
public String[] getOptions()(Code)(Java Doc)
public int getParent(int iNode, int iParent)(Code)(Java Doc)
public int getParentCardinality(int iNode)(Code)(Java Doc)
public ParentSet getParentSet(int iNode)(Code)(Java Doc)
public ParentSet[] getParentSets()(Code)(Java Doc)
public double getProbability(int iNode, int iParent, int iValue)(Code)(Java Doc)
public SearchAlgorithm getSearchAlgorithm()(Code)(Java Doc)
public boolean getUseADTree()(Code)(Java Doc)
public String globalInfo()(Code)(Java Doc)
public String graph() throws Exception(Code)(Java Doc)
public int graphType()(Code)(Java Doc)
public void initCPTs() throws Exception(Code)(Java Doc)
public void initStructure() throws Exception(Code)(Java Doc)
public Enumeration listOptions()(Code)(Java Doc)
public static void main(String[] argv)(Code)(Java Doc)
public double measureAICScore()(Code)(Java Doc)
public double measureBDeuScore()(Code)(Java Doc)
public double measureBayesScore()(Code)(Java Doc)
public double measureDivergence()(Code)(Java Doc)
public double measureEntropyScore()(Code)(Java Doc)
public double measureExtraArcs()(Code)(Java Doc)
public double measureMDLScore()(Code)(Java Doc)
public double measureMissingArcs()(Code)(Java Doc)
public double measureReversedArcs()(Code)(Java Doc)
public static String[] partitionOptions(String[] options)(Code)(Java Doc)
public String searchAlgorithmTipText()(Code)(Java Doc)
public void setBIFFile(String sBIFFile)(Code)(Java Doc)
public void setEstimator(BayesNetEstimator newBayesNetEstimator)(Code)(Java Doc)
public void setOptions(String[] options) throws Exception(Code)(Java Doc)
public void setSearchAlgorithm(SearchAlgorithm newSearchAlgorithm)(Code)(Java Doc)
public void setUseADTree(boolean bUseADTree)(Code)(Java Doc)
public String toString()(Code)(Java Doc)
public String toXMLBIF03()(Code)(Java Doc)
public void updateClassifier(Instance instance) throws Exception(Code)(Java Doc)
public String useADTreeTipText()(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.