bifreader.html

来自「由java开发的软件包」· HTML 代码 · 共 512 行 · 第 1/2 页

HTML
512
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.4.2_05) on Mon Mar 07 15:27:16 NZDT 2005 --><TITLE>BIFReader</TITLE><META NAME="keywords" CONTENT="weka.classifiers.bayes.net.BIFReader class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="BIFReader";}</SCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">  <TR ALIGN="center" VALIGN="top">  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../../weka/classifiers/bayes/net/BayesNetGenerator.html" title="class in weka.classifiers.bayes.net"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../../weka/classifiers/bayes/net/ParentSet.html" title="class in weka.classifiers.bayes.net"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="BIFReader.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<SCRIPT type="text/javascript">  <!--  if(window==top) {    document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>');  }  //--></SCRIPT><NOSCRIPT>  <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_weka.classifiers.bayes.BayesNet">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.classifiers.bayes.net</FONT><BR>Class BIFReader</H2><PRE>java.lang.Object  <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">weka.classifiers.Classifier</A>      <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">weka.classifiers.bayes.BayesNet</A>          <IMG SRC="../../../../resources/inherit.gif" ALT="extended by"><B>weka.classifiers.bayes.net.BIFReader</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A>, java.lang.Cloneable, <A HREF="../../../../weka/core/Drawable.html" title="interface in weka.core">Drawable</A>, <A HREF="../../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A>, java.io.Serializable, <A HREF="../../../../weka/core/WeightedInstancesHandler.html" title="interface in weka.core">WeightedInstancesHandler</A></DD></DL><HR><DL><DT>public class <B>BIFReader</B><DT>extends <A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A></DL><P>Builds a description of a Bayes Net classifier stored in XML BIF 0.3 format. See http://www-2.cs.cmu.edu/~fgcozman/Research/InterchangeFormat/ for details on XML BIF.<P><P><DL><DT><B>Version:</B></DT>  <DD>$Revision: 1.7 $</DD><DT><B>Author:</B></DT>  <DD>Remco Bouckaert (rrb@xm.co.nz)</DD><DT><B>See Also:</B><DD><A HREF="../../../../serialized-form.html#weka.classifiers.bayes.net.BIFReader">Serialized Form</A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_weka.classifiers.bayes.BayesNet"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from class weka.classifiers.bayes.<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../weka/classifiers/bayes/BayesNet.html#m_Distributions">m_Distributions</A>, <A HREF="../../../../weka/classifiers/bayes/BayesNet.html#m_Instances">m_Instances</A></CODE></TD></TR></TABLE>&nbsp;<A NAME="fields_inherited_from_class_weka.core.Drawable"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Fields inherited from interface weka.core.<A HREF="../../../../weka/core/Drawable.html" title="interface in weka.core">Drawable</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../../weka/core/Drawable.html#BayesNet">BayesNet</A>, <A HREF="../../../../weka/core/Drawable.html#NOT_DRAWABLE">NOT_DRAWABLE</A>, <A HREF="../../../../weka/core/Drawable.html#TREE">TREE</A></CODE></TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#BIFReader()">BIFReader</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;double</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#divergence(weka.classifiers.bayes.BayesNet)">divergence</A></B>(<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A>&nbsp;other)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#extraArcs(weka.classifiers.bayes.BayesNet)">extraArcs</A></B>(<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A>&nbsp;other)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Count nr of exta arcs  from other network compared to current network Note that an arc is not 'extra' if it is reversed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#getFileName()">getFileName</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#getNode(java.lang.String)">getNode</A></B>(java.lang.String&nbsp;sNodeName)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;getNode finds the index of the node with name sNodeName and throws an exception if no such node can be found.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Main method for testing this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#missingArcs(weka.classifiers.bayes.BayesNet)">missingArcs</A></B>(<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A>&nbsp;other)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Count nr of arcs missing from other network compared to current network Note that an arc is not 'missing' if it is reversed.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html" title="class in weka.classifiers.bayes.net">BIFReader</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#processFile(java.lang.String)">processFile</A></B>(java.lang.String&nbsp;sFile)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;processFile reads a BIFXML file and initializes a Bayes Net</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#reversedArcs(weka.classifiers.bayes.BayesNet)">reversedArcs</A></B>(<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A>&nbsp;other)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Count nr of reversed arcs from other network compared to current network</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../weka/classifiers/bayes/net/BIFReader.html#Sync(weka.classifiers.bayes.BayesNet)">Sync</A></B>(<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A>&nbsp;other)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;synchronizes the node ordering of this Bayes network with those in the other network (if possible).</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_weka.classifiers.bayes.BayesNet"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class weka.classifiers.bayes.<A HREF="../../../../weka/classifiers/bayes/BayesNet.html" title="class in weka.classifiers.bayes">BayesNet</A></B></TD>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?