📄 bftree.html
字号:
</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> data) throws java.lang.Exception</PRE><DL><DD>Method for building a BestFirst decision tree 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>data</CODE> - set of instances serving as training data<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if decision tree cannot be built successfully</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>Computes class probabilities for instance using the decision tree.<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 for which class probabilities is to be computed<DT><B>Returns:</B><DD>the class probabilities for the given instance<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Prints the decision tree using the protected toString method from below.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a textual description of the classifier</DL></DD></DL><HR><A NAME="numNodes()"><!-- --></A><H3>numNodes</H3><PRE>public int <B>numNodes</B>()</PRE><DL><DD>Compute size of the tree.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>size of the tree</DL></DD></DL><HR><A NAME="numLeaves()"><!-- --></A><H3>numLeaves</H3><PRE>public int <B>numLeaves</B>()</PRE><DL><DD>Compute number of leaf nodes.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>number of leaf nodes</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/RandomizableClassifier.html#listOptions()">listOptions</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/RandomizableClassifier.html" title="class in weka.classifiers">RandomizableClassifier</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration describing 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 the options for this object. <p/> <!-- options-start --> Valid options are: <p/> <pre> -S <num> Random number seed. (default 1)</pre> <pre> -D If set, classifier is run in debug mode and may output additional info to the console</pre> <pre> -P <UNPRUNED|POSTPRUNED|PREPRUNED> The pruning strategy. (default: POSTPRUNED)</pre> <pre> -M <min no> The minimal number of instances at the terminal nodes. (default 2)</pre> <pre> -N <num folds> The number of folds used in the pruning. (default 5)</pre> <pre> -H Don't use heuristic search for nominal attributes in multi-class problem (default yes). </pre> <pre> -G Don't use Gini index for splitting (default yes), if not information is used.</pre> <pre> -R Don't use error rate in internal cross-validation (default yes), but root mean squared error.</pre> <pre> -A Use the 1 SE rule to make pruning decision. (default no).</pre> <pre> -C Percentage of training data size (0-1] (default 1).</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/RandomizableClassifier.html#setOptions(java.lang.String[])">setOptions</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/RandomizableClassifier.html" title="class in weka.classifiers">RandomizableClassifier</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>options</CODE> - the options to use<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if setting of options fails</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/RandomizableClassifier.html#getOptions()">getOptions</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/RandomizableClassifier.html" title="class in weka.classifiers">RandomizableClassifier</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the current settings of the Classifier</DL></DD></DL><HR><A NAME="enumerateMeasures()"><!-- --></A><H3>enumerateMeasures</H3><PRE>public java.util.Enumeration <B>enumerateMeasures</B>()</PRE><DL><DD>Return an enumeration of the measure names.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html#enumerateMeasures()">enumerateMeasures</A></CODE> in interface <CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of the measure names</DL></DD></DL><HR><A NAME="measureTreeSize()"><!-- --></A><H3>measureTreeSize</H3><PRE>public double <B>measureTreeSize</B>()</PRE><DL><DD>Return number of tree size.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>number of tree size</DL></DD></DL><HR><A NAME="getMeasure(java.lang.String)"><!-- --></A><H3>getMeasure</H3><PRE>public double <B>getMeasure</B>(java.lang.String additionalMeasureName)</PRE><DL><DD>Returns the value of the named measure<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html#getMeasure(java.lang.String)">getMeasure</A></CODE> in interface <CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>additionalMeasureName</CODE> - the name of the measure to query for its value<DT><B>Returns:</B><DD>the value of the named measure<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the named measure is not supported</DL></DD></DL><HR><A NAME="pruningStrategyTipText()"><!-- --></A><H3>pruningStrategyTipText</H3><PRE>public java.lang.String <B>pruningStrategyTipText</B>()</PRE><DL><DD>Returns the tip text for this property<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>tip text for this property suitable for displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="setPruningStrategy(weka.core.SelectedTag)"><!-- --></A><H3>setPruningStrategy</H3><PRE>public void <B>setPruningStrategy</B>(<A HREF="../../../weka/core/SelectedTag.html" title="class in weka.core">SelectedTag</A> value)</PRE><DL><DD>Sets the pruning strategy.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - the strategy</DL></DD></DL><HR><A NAME="getPruningStrategy()"><!-- --></A><H3>getPruningStrategy</H3><PRE>public <A HREF="../../../weka/core/SelectedTag.html" title="class in weka.core">SelectedTag</A> <B>getPruningStrategy</B>()</PRE><DL><DD>Gets the pruning strategy.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the current strategy.</DL></DD></DL><HR><A NAME="minNumObjTipText()"><!-- --></A><H3>minNumObjTipText</H3><PRE>public java.lang.String <B>minNumObjTipText</B>()</PRE><DL><DD>Returns the tip text for this property<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>tip text for this property suitable for displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="setMinNumObj(int)"><!-- --></A><H3>setMinNumObj</H3><PRE>public void <B>setMinNumObj</B>(int value)</PRE><DL><DD>Set minimal number of instances at the terminal nodes.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>value</CODE> - minimal number of instances at the terminal nodes</DL></DD></DL><HR><A NAME="getMinNumObj()"><!-- --></A><H3>getMinNumObj</H3><PRE>public int <B>getMinNumObj</B>()</PRE><DL><DD>Get minimal number of instances at the terminal nodes.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>minimal number of instances at the terminal nodes</DL></DD></DL><HR><A NAME="numFoldsPruningTipText()"><!-- --></A><H3>numFoldsPruningTipText</H3><PRE>public java.lang.String <B>numFoldsPruningTipText</B>()</PRE><DL><DD>Returns the tip text for this property<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>tip text for this property suitable for displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="setNumFoldsPruning(int)"><!-- --></A><H3>setNumFoldsPruning</H3><PRE>public void <B>setNumFoldsPruning</B>(int value)</PRE><DL><DD>Set number of folds in internal cross-validation.<P><DD><DL></DL></DD><DD><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -