📄 bayesnet.html
字号:
</DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="BayesNet()"><!-- --></A><H3>BayesNet</H3><PRE>public <B>BayesNet</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="getCapabilities()"><!-- --></A><H3>getCapabilities</H3><PRE>public <A HREF="../../../weka/core/Capabilities.html" title="class in weka.core">Capabilities</A> <B>getCapabilities</B>()</PRE><DL><DD>Returns default capabilities of the classifier.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/CapabilitiesHandler.html#getCapabilities()">getCapabilities</A></CODE> in interface <CODE><A HREF="../../../weka/core/CapabilitiesHandler.html" title="interface in weka.core">CapabilitiesHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#getCapabilities()">getCapabilities</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the capabilities of this classifier<DT><B>See Also:</B><DD><A HREF="../../../weka/core/Capabilities.html" title="class in weka.core"><CODE>Capabilities</CODE></A></DL></DD></DL><HR><A NAME="buildClassifier(weka.core.Instances)"><!-- --></A><H3>buildClassifier</H3><PRE>public void <B>buildClassifier</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> instances) throws java.lang.Exception</PRE><DL><DD>Generates the classifier.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#buildClassifier(weka.core.Instances)">buildClassifier</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - set of instances serving as training data<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the classifier has not been generated successfully</DL></DD></DL><HR><A NAME="initStructure()"><!-- --></A><H3>initStructure</H3><PRE>public void <B>initStructure</B>() throws java.lang.Exception</PRE><DL><DD>Init structure initializes the structure to an empty graph or a Naive Bayes graph (depending on the -N flag).<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case of an error</DL></DD></DL><HR><A NAME="buildStructure()"><!-- --></A><H3>buildStructure</H3><PRE>public void <B>buildStructure</B>() throws java.lang.Exception</PRE><DL><DD>buildStructure determines the network structure/graph of the network. The default behavior is creating a network where all nodes have the first node as its parent (i.e., a BayesNet that behaves like a naive Bayes classifier). This method can be overridden by derived classes to restrict the class of network structures that are acceptable.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case of an error</DL></DD></DL><HR><A NAME="estimateCPTs()"><!-- --></A><H3>estimateCPTs</H3><PRE>public void <B>estimateCPTs</B>() throws java.lang.Exception</PRE><DL><DD>estimateCPTs estimates the conditional probability tables for the Bayes Net using the network structure.<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case of an error</DL></DD></DL><HR><A NAME="initCPTs()"><!-- --></A><H3>initCPTs</H3><PRE>public void <B>initCPTs</B>() throws java.lang.Exception</PRE><DL><DD>initializes the conditional probabilities<P><DD><DL></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - in case of an error</DL></DD></DL><HR><A NAME="updateClassifier(weka.core.Instance)"><!-- --></A><H3>updateClassifier</H3><PRE>public void <B>updateClassifier</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Updates the classifier with the given instance.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the new training instance to include in the model<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the instance could not be incorporated in the model.</DL></DD></DL><HR><A NAME="distributionForInstance(weka.core.Instance)"><!-- --></A><H3>distributionForInstance</H3><PRE>public double[] <B>distributionForInstance</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Calculates the class membership probabilities for the given test instance.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#distributionForInstance(weka.core.Instance)">distributionForInstance</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance to be classified<DT><B>Returns:</B><DD>predicted class probability distribution<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if there is a problem generating the prediction</DL></DD></DL><HR><A NAME="countsForInstance(weka.core.Instance)"><!-- --></A><H3>countsForInstance</H3><PRE>public double[] <B>countsForInstance</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Calculates the counts for Dirichlet distribution for the class membership probabilities for the given test instance.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance to be classified<DT><B>Returns:</B><DD>counts for Dirichlet distribution for class probability<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if there is a problem generating the prediction</DL></DD></DL><HR><A NAME="listOptions()"><!-- --></A><H3>listOptions</H3><PRE>public java.util.Enumeration <B>listOptions</B>()</PRE><DL><DD>Returns an enumeration describing the available options<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/OptionHandler.html#listOptions()">listOptions</A></CODE> in interface <CODE><A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#listOptions()">listOptions</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of all the available options</DL></DD></DL><HR><A NAME="setOptions(java.lang.String[])"><!-- --></A><H3>setOptions</H3><PRE>public void <B>setOptions</B>(java.lang.String[] options) throws java.lang.Exception</PRE><DL><DD>Parses a given list of options. <p> <!-- options-start --> Valid options are: <p/> <pre> -D Do not use ADTree data structure </pre> <pre> -B <BIF file> BIF file to compare with </pre> <pre> -Q weka.classifiers.bayes.net.search.SearchAlgorithm Search algorithm </pre> <pre> -E weka.classifiers.bayes.net.estimate.SimpleEstimator Estimator algorithm </pre> <!-- options-end --><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/OptionHandler.html#setOptions(java.lang.String[])">setOptions</A></CODE> in interface <CODE><A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#setOptions(java.lang.String[])">setOptions</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>options</CODE> - the list of options as an array of strings<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an option is not supported</DL></DD></DL><HR><A NAME="partitionOptions(java.lang.String[])"><!-- --></A><H3>partitionOptions</H3><PRE>public static java.lang.String[] <B>partitionOptions</B>(java.lang.String[] options)</PRE><DL><DD>Returns the secondary set of options (if any) contained in the supplied options array. The secondary set is defined to be any options after the first "--" but before the "-E". These options are removed from the original options array.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>options</CODE> - the input array of options<DT><B>Returns:</B><DD>the array of secondary options</DL></DD></DL><HR><A NAME="getOptions()"><!-- --></A><H3>getOptions</H3><PRE>public java.lang.String[] <B>getOptions</B>()</PRE><DL><DD>Gets the current settings of the classifier.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/OptionHandler.html#getOptions()">getOptions</A></CODE> in interface <CODE><A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#getOptions()">getOptions</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of strings suitable for passing to setOptions</DL></DD></DL><HR><A NAME="setSearchAlgorithm(weka.classifiers.bayes.net.search.SearchAlgorithm)"><!-- --></A><H3>setSearchAlgorithm</H3><PRE>public void <B>setSearchAlgorithm</B>(<A HREF="../../../weka/classifiers/bayes/net/search/SearchAlgorithm.html" title="class in weka.classifiers.bayes.net.search">SearchAlgorithm</A> newSearchAlgorithm)</PRE><DL><DD>Set the SearchAlgorithm used in searching for network structures.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newSearchAlgorithm</CODE> - the SearchAlgorithm to use.</DL></DD></DL><HR><A NAME="getSearchAlgorithm()"><!-- --></A><H3>getSearchAlgorithm</H3><PRE>public <A HREF="../../../weka/classifiers/bayes/net/search/SearchAlgorithm.html" title="class in weka.classifiers.bayes.net.search">SearchAlgorithm</A> <B>getSearchAlgorithm</B>()</PRE><DL><DD>Get the SearchAlgorithm used as the search algorithm<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the SearchAlgorithm used as the search algorithm</DL></DD></DL><HR><A NAME="setEstimator(weka.classifiers.bayes.net.estimate.BayesNetEstimator)"><!-- --></A><H3>setEstimator</H3><PRE>public void <B>setEstimator</B>(<A HREF="../../../weka/classifiers/bayes/net/estimate/BayesNetEstimator.html" title="class in weka.classifiers.bayes.net.estimate">BayesNetEstimator</A> newBayesNetEstimator)</PRE><DL><DD>Set the Estimator Algorithm used in calculating the CPTs<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newBayesNetEstimator</CODE> - the Estimator to use.</DL></DD></DL><HR><A NAME="getEstimator()"><!-- --></A><H3>getEstimator</H3><PRE>public <A HREF="../../../weka/classifiers/bayes/net/estimate/BayesNetEstimator.html" title="class in weka.classifiers.bayes.net.estimate">BayesNetEstimator</A> <B>getEstimator</B>()</PRE><DL><DD>Get the BayesNetEstimator used for calculating the CPTs<P><DD><DL></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -