📄 checkclassifier.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Wed Sep 04 10:31:48 CDT 2002 --><TITLE>: Class CheckClassifier</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../weka/classifiers/BVDecompose.html"><B>PREV CLASS</B></A> <A HREF="../../weka/classifiers/ClassificationViaRegression.html"><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> <A HREF="CheckClassifier.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <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><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.classifiers</FONT><BR>Class CheckClassifier</H2><PRE>java.lang.Object | +--<B>weka.classifiers.CheckClassifier</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></DD></DL><HR><DL><DT>public class <B>CheckClassifier</B><DT>extends java.lang.Object<DT>implements <A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></DL><P>Class for examining the capabilities and finding problems with classifiers. If you implement a classifier using the WEKA.libraries, you should run the checks on it to ensure robustness and correct operation. Passing all the tests of this object does not mean bugs in the classifier don't exist, but this will help find some common ones. <p> Typical usage: <p> <code>java weka.classifiers.CheckClassifier -W classifier_name classifier_options </code><p> CheckClassifier reports on the following: <ul> <li> Classifier abilities <ul> <li> Possible command line options to the classifier <li> Whether the classifier is a distributionClassifier <li> Whether the classifier can predict nominal and/or predict numeric class attributes. Warnings will be displayed if performance is worse than ZeroR <li> Whether the classifier can be trained incrementally <li> Whether the classifier can handle numeric predictor attributes <li> Whether the classifier can handle nominal predictor attributes <li> Whether the classifier can handle string predictor attributes <li> Whether the classifier can handle missing predictor values <li> Whether the classifier can handle missing class values <li> Whether a nominal classifier only handles 2 class problems <li> Whether the classifier can handle instance weights </ul> <li> Correct functioning <ul> <li> Correct initialisation during buildClassifier (i.e. no result changes when buildClassifier called repeatedly) <li> Whether incremental training produces the same results as during non-incremental training (which may or may not be OK) <li> Whether the classifier alters the data pased to it (number of instances, instance order, instance weights, etc) </ul> <li> Degenerate cases <ul> <li> building classifier with zero training instances <li> all but one predictor attribute values missing <li> all predictor attribute values missing <li> all but one class values missing <li> all class values missing </ul> </ul> Running CheckClassifier with the debug option set will output the training and test datasets for any failed tests.<p> 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.<p><P><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><A NAME="field_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Field Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#m_AnalysisResults">m_AnalysisResults</A></B></CODE><BR> The results of the analysis as a string</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected <A HREF="../../weka/classifiers/Classifier.html">Classifier</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#m_Classifier">m_Classifier</A></B></CODE><BR> The classifier to be examined</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#m_ClassifierOptions">m_ClassifierOptions</A></B></CODE><BR> The options to be passed to the base classifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#m_Debug">m_Debug</A></B></CODE><BR> Debugging mode, gives extra output if true</TD></TR></TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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/CheckClassifier.html#CheckClassifier()">CheckClassifier</A></B>()</CODE><BR> </TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><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>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#addMissing(weka.core.Instances, int, boolean, boolean)">addMissing</A></B>(<A HREF="../../weka/core/Instances.html">Instances</A> data, int level, boolean predictorMissing, boolean classMissing)</CODE><BR> Add missing values to a dataset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#canHandleMissing(boolean, boolean, boolean, boolean, boolean, int)">canHandleMissing</A></B>(boolean nominalPredictor, boolean numericPredictor, boolean numericClass, boolean predictorMissing, boolean classMissing, int missingLevel)</CODE><BR> Checks basic missing value handling of the scheme.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#canHandleNClasses(boolean, boolean, int)">canHandleNClasses</A></B>(boolean nominalPredictor, boolean numericPredictor, int numClasses)</CODE><BR> Checks whether nominal schemes can handle more than two classes.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#canHandleZeroTraining(boolean, boolean, boolean)">canHandleZeroTraining</A></B>(boolean nominalPredictor, boolean numericPredictor, boolean numericClass)</CODE><BR> Checks whether the scheme can handle zero training instances.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#canPredict(boolean, boolean, boolean)">canPredict</A></B>(boolean nominalPredictor, boolean numericPredictor, boolean numericClass)</CODE><BR> Checks basic prediction of the scheme, for simple non-troublesome datasets.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#canTakeOptions()">canTakeOptions</A></B>()</CODE><BR> Checks whether the scheme can take command line options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#compareDatasets(weka.core.Instances, weka.core.Instances)">compareDatasets</A></B>(<A HREF="../../weka/core/Instances.html">Instances</A> data1, <A HREF="../../weka/core/Instances.html">Instances</A> data2)</CODE><BR> Compare two datasets to see if they differ.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/CheckClassifier.html#correctBuildInitialisation(boolean, boolean, boolean)">correctBuildInitialisation</A></B>(boolean nominalPredictor, boolean numericPredictor,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -