📄 bntools.html
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="BNTools()"><!-- --></A><H3>BNTools</H3><PRE>public <B>BNTools</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="getNetworkDimension(BayesianNetworks.BayesNet)"><!-- --></A><H3>getNetworkDimension</H3><PRE>public static int <B>getNetworkDimension</B>(BayesianNetworks.BayesNet net) throws java.lang.Exception</PRE><DL><DD>Returns dimension of a Bayesian network. <p> <p/> <b>Dimension of a Bayesian network:</b> <i> Let X be a set of random variables and B be a Bayesian network defined over X. The dimension of this network, Dim(B), is the number of free parameters required to completely specify the joint probability distribution of X.</i> <br> <p/> <p/> E. Castillo, J. M. Gutierrez and A. S. Hadi, <i>Expert Systems and Probabilistic Network Models</i> , Springer, 1997. p.486.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>net</CODE> - Description of Parameter<DT><B>Returns:</B><DD>The NetworkDimension value<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - .</DL></DD></DL><HR><A NAME="getASBMParamComponent(BayesianNetworks.BayesNet, jbnc.dataset.DatasetInt, boolean, double)"><!-- --></A><H3>getASBMParamComponent</H3><PRE>public static final double <B>getASBMParamComponent</B>(BayesianNetworks.BayesNet net, <A HREF="../../jbnc/dataset/DatasetInt.html" title="class in jbnc.dataset">DatasetInt</A> dataset, boolean usePriors, double alphaK) throws java.lang.Exception</PRE><DL><DD>Return network parameters component of the asymptotic standard Bayesian measure (ASBM). <p> <p/> <i>q</i> = sum<sub><i>i</i> =1...<i>n</i> </sub> sum<sub><i>j</i> =1...<i> q<sub>i</sub> </i> </sub> sum<sub><i>k</i> =1...<i>r<sub>i</sub> </i> </sub> <i>N<sub>ijk</sub> </i> log <i>N<sub>ijk</sub> </i> / <i>N<sub>ij </sub></i> <p> <p/> where <i>N<sub>ijk</sub> </i> means that variable <i>X<sub>i</sub> </i> is in configuration <i>k</i> and parents of variable <i>X<sub>i</sub> </i> are in configuration <i>j</i> . <p> <p/> E. Castillo, J. M. Gutierrez and A. S. Hadi, <i>Expert Systems and Probabilistic Network Models</i> , Springer, 1997. p.494, eq.(11.28).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>net</CODE> - Description of Parameter<DD><CODE>dataset</CODE> - Description of Parameter<DD><CODE>usePriors</CODE> - Description of Parameter<DD><CODE>alphaK</CODE> - Description of Parameter<DT><B>Returns:</B><DD>The ASBMParamComponent value<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - .</DL></DD></DL><HR><A NAME="gammaLn(double)"><!-- --></A><H3>gammaLn</H3><PRE>public static double <B>gammaLn</B>(double xx) throws java.lang.Exception</PRE><DL><DD>Returns the value ln[ gamma(xx)] for xx > 0 Implementation based on W.H. Press et al. <i>Numerical Recipes in C</i> , 2nd Ed., Cambridge University Press, 1992.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>xx</CODE> - <DT><B>Returns:</B><DD>the value of ln[ gamma(xx)] for xx > 0.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - When xx <= 0.</DL></DD></DL><HR><A NAME="learnParameters(BayesianNetworks.BayesNet, jbnc.util.FrequencyCalc, boolean, double)"><!-- --></A><H3>learnParameters</H3><PRE>public static void <B>learnParameters</B>(BayesianNetworks.BayesNet net, <A HREF="../../jbnc/util/FrequencyCalc.html" title="class in jbnc.util">FrequencyCalc</A> fc, boolean useDirihlet, double alphaK) throws java.lang.Exception</PRE><DL><DD>Learns parameters for the current network structure. Existing network parameters are replaced with the new ones. This method can use "uniform" Dirihlet priors.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>net</CODE> - Bayesian network.<DD><CODE>useDirihlet</CODE> - Indicates whether Dirihlet priors should be used for network parameters.<DD><CODE>alphaK</CODE> - alpha<sub>k</sub> parameter for Dirihlet priors. All alpha<sub>k</sub> are assumed to be the same and greater than zero.<DD><CODE>fc</CODE> - Description of Parameter<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE></DL></DD></DL><HR><A NAME="learnParameters(BayesianNetworks.BayesNet, jbnc.dataset.DatasetInt, boolean, double)"><!-- --></A><H3>learnParameters</H3><PRE>public static void <B>learnParameters</B>(BayesianNetworks.BayesNet net, <A HREF="../../jbnc/dataset/DatasetInt.html" title="class in jbnc.dataset">DatasetInt</A> data, boolean useDirihlet, double alphaK) throws java.lang.Exception</PRE><DL><DD>Learns parameters for the current network structure. Existing network parameters are replaced with the new ones. This method can use "uniform" Dirihlet priors.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>net</CODE> - Bayesian network.<DD><CODE>useDirihlet</CODE> - Indicates whether Dirihlet priors should be used for network parameters.<DD><CODE>alphaK</CODE> - alpha<sub>k</sub> parameter for Dirihlet priors. All alpha<sub>k</sub> are assumed to be the same and greater than zero.<DD><CODE>data</CODE> - Description of Parameter<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE></DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] args)</PRE><DL><DD>Description of the Method<P><DD><DL><DT><B>Parameters:</B><DD><CODE>args</CODE> - Description of Parameter</DL></DD></DL><HR><A NAME="getNodes(jbnc.dataset.Dataset, InferenceGraphs.InferenceGraph)"><!-- --></A><H3>getNodes</H3><PRE>protected static InferenceGraphs.InferenceGraphNode[] <B>getNodes</B>(<A HREF="../../jbnc/dataset/Dataset.html" title="class in jbnc.dataset">Dataset</A> dataset, InferenceGraphs.InferenceGraph graph) throws java.lang.Exception</PRE><DL><DD>Get node names from a graph in an order they appear in the dataset.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dataset</CODE> - Description of Parameter<DD><CODE>graph</CODE> - Description of Parameter<DT><B>Returns:</B><DD>The Nodes value<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - Description of Exception</DL></DD></DL><HR><A NAME="learnParameters_old(BayesianNetworks.BayesNet, jbnc.dataset.Dataset, boolean, double)"><!-- --></A><H3>learnParameters_old</H3><PRE>protected static void <B>learnParameters_old</B>(BayesianNetworks.BayesNet net, <A HREF="../../jbnc/dataset/Dataset.html" title="class in jbnc.dataset">Dataset</A> data, boolean useDirihlet, double alphaK) throws java.lang.Exception</PRE><DL><DD>Learns parameters for the current network structure. Existing network parameters are replaced with the new ones. This method can use "uniform" Dirihlet priors.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>net</CODE> - Bayesian network.<DD><CODE>useDirihlet</CODE> - Indicates whether Dirihlet priors should be used for network parameters.<DD><CODE>alphaK</CODE> - alpha<sub>k</sub> parameter for Dirihlet priors. All alpha<sub>k</sub> are assumed to be the same and greater than zero.<DD><CODE>data</CODE> - Description of Parameter<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE></DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_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> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> <a href="http://jbnc.sourceforge.net"> <img src="http://sourceforge.net/sflogo.php?group_id=49871&type=1" width="88" height="31" border="0" alt="SourceForge.net Logo"> </a> </EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../jbnc/util/BNCTester.Result.html" title="class in jbnc.util"><B>PREV CLASS</B></A> <A HREF="../../jbnc/util/CondMutualInfo.html" title="class in jbnc.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html?jbnc/util/BNTools.html" target="_top"><B>FRAMES</B></A> <A HREF="BNTools.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -