📄 checkclassifier.html
字号:
<!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><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<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">OptionHandler</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. Valid options are:<p> -D <br> Turn on debugging output.<p> -W classname <br> Specify the full class name of a classifier to perform the tests on (required).<p> Options after -- are passed to the designated classifier<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">OptionHandler</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="getOptions()"><!-- --></A><H3>getOptions</H3><PRE>public java.lang.String[] <B>getOptions</B>()</PRE><DL><DD>Gets the current settings of the CheckClassifier.<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">OptionHandler</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="doTests()"><!-- --></A><H3>doTests</H3><PRE>public void <B>doTests</B>()</PRE><DL><DD>Begin the tests, reporting results to System.out<DD><DL></DL></DD></DL><HR><A NAME="setDebug(boolean)"><!-- --></A><H3>setDebug</H3><PRE>public void <B>setDebug</B>(boolean debug)</PRE><DL><DD>Set debugging mode<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>debug</CODE> - true if debug output should be printed</DL></DD></DL><HR><A NAME="getDebug()"><!-- --></A><H3>getDebug</H3><PRE>public boolean <B>getDebug</B>()</PRE><DL><DD>Get whether debugging is turned on<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if debugging output is on</DL></DD></DL><HR><A NAME="setClassifier(weka.classifiers.Classifier)"><!-- --></A><H3>setClassifier</H3><PRE>public void <B>setClassifier</B>(<A HREF="../../weka/classifiers/Classifier.html">Classifier</A> newClassifier)</PRE><DL><DD>Set the classifier for boosting.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newClassifier</CODE> - the Classifier to use.</DL></DD></DL><HR><A NAME="getClassifier()"><!-- --></A><H3>getClassifier</H3><PRE>public <A HREF="../../weka/classifiers/Classifier.html">Classifier</A> <B>getClassifier</B>()</PRE><DL><DD>Get the classifier used as the classifier<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the classifier used as the classifier</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>Test method for this class<DD><DL></DL></DD></DL><HR><A NAME="testsPerClassType(boolean, boolean, boolean)"><!-- --></A><H3>testsPerClassType</H3><PRE>protected void <B>testsPerClassType</B>(boolean numericClass, boolean updateable, boolean weighted)</PRE><DL><DD>Run a battery of tests for a given class attribute type<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>numericClass</CODE> - true if the class attribute should be numeric<DD><CODE>updateable</CODE> - true if the classifier is updateable<DD><CODE>weighted</CODE> - true if the classifier says it handles weights</DL></DD></DL><HR><A NAME="canTakeOptions()"><!-- --></A><H3>canTakeOptions</H3><PRE>protected boolean <B>canTakeOptions</B>()</PRE><DL><DD>Checks whether the scheme can take command line options.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the classifier can take options</DL></DD></DL><HR><A NAME="distributionClassifier()"><!-- --></A><H3>distributionClassifier</H3><PRE>protected boolean <B>distributionClassifier</B>()</PRE><DL><DD>Checks whether the scheme is a distribution classifier.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the classifier produces distributions</DL></DD></DL><HR><A NAME="updateableClassifier()"><!-- --></A><H3>updateableClassifier</H3><PRE>protected boolean <B>updateableClassifier</B>()</PRE><DL><DD>Checks whether the scheme can build models incrementally.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the classifier can train incrementally</DL></DD></DL><HR><A NAME="weightedInstancesHandler()"><!-- --></A><H3>weightedInstancesHandler</H3><PRE>protected boolean <B>weightedInstancesHandler</B>()</PRE><DL><DD>Checks whether the scheme says it can handle instance weights.<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if the classifier handles instance weights</DL></DD></DL><HR><A NAME="canPredict(boolean, boolean, boolean)"><!-- --></A><H3>canPredict</H3><PRE>protected boolean <B>canPredict</B>(boolean nominalPredictor, boolean numericPredictor, boolean numericClass)</PRE><DL><DD>Checks basic prediction of the scheme, for simple non-troublesome datasets.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nominalPredictor</CODE> - if true use nominal predictor attributes<DD><CODE>numericPredictor</CODE> - if true use numeric predictor attributes<DD><CODE>numericClass</CODE> - if true use a numeric class attribute otherwise a nominal class attribute<DT><B>Returns:</B><DD>true if the test was passed</DL></DD></DL><HR><A NAME="canHandleNClasses(boolean, boolean, int)"><!-- --></A><H3>canHandleNClasses</H3><PRE>protected boolean <B>canHandleNClasses</B>(boolean nominalPredictor, boolean numericPredictor, int numClasses)</PRE><DL><DD>Checks whether nominal schemes can handle more than two classes. If a scheme is only designed for two-class problems it should throw an appropriate exception for multi-class problems.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nominalPredictor</CODE> - if true use nominal predictor attributes<DD><CODE>numericPredictor</CODE> - if true use numeric predictor attributes<DD><CODE>numClasses</CODE> - the number of classes to test<DT><B>Returns:</B><DD>true if the test was passed</DL></DD></DL><HR><A NAME="canHandleZeroTraining(boolean, boolean, boolean)"><!-- --></A><H3>canHandleZeroTraining</H3><PRE>protected boolean <B>canHandleZeroTraining</B>(boolean nominalPredictor, boolean numericPredictor, boolean numericClass)</PRE><DL><DD>Checks whether the scheme can handle zero training instances.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>nominalPredictor</CODE> - if true use nominal predictor attributes<DD><CODE>numericPredictor</CODE> - if true use numeric predictor attributes<DD><CODE>numericClass</CODE> - if true use a numeric class attribute otherwise a nominal class attribute<DT><B>Returns:</B><DD>true if the test was passed</DL></DD></DL><HR><A NAME="correctBuildInitialisation(boolean, boolean, boolean)"><!-- --></A><H3>correctBuildInitialisation</H3><PRE>protected boolean <B>correctBuildInitialisation</B>(boolean nominalPredictor, boolean numericPredictor, boolean numericClass)</PRE><DL><DD>Checks whether the scheme correctly initialises models when buildClassifier is called. This test calls buildClassifier with one training dataset and records performance on a test set. buildClassifier is then called on a training set with different structure, and then again with the original training set. The performance on the test set is compared with the original results and any performance difference noted as incorrect build initialisation.<DD><DL></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -