⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 checkestimator.html

📁 weka是机器学习和数据挖掘领域最有影响力的开源项目之一
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc (build 1.5.0_10) on Fri Jan 26 16:34:51 NZDT 2007 --><TITLE>CheckEstimator</TITLE><META NAME="keywords" CONTENT="weka.estimators.CheckEstimator class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="CheckEstimator";}</SCRIPT><NOSCRIPT></NOSCRIPT></HEAD><BODY BGCOLOR="white" onload="windowTitle();"><!-- ========= START OF TOP NAVBAR ======= --><A NAME="navbar_top"><!-- --></A><A HREF="#skip-navbar_top" 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_top_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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/" target="_blank"><FONT CLASS="NavBarFont1"><B>Weka's home</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;PREV CLASS&nbsp;&nbsp;<A HREF="../../weka/estimators/CheckEstimator.AttrTypes.html" title="class in weka.estimators"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../index.html?weka/estimators/CheckEstimator.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="CheckEstimator.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;<A HREF="#nested_class_summary">NESTED</A>&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_top"></A><!-- ========= END OF TOP NAVBAR ========= --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">weka.estimators</FONT><BR>Class CheckEstimator</H2><PRE>java.lang.Object  <IMG SRC="../../resources/inherit.gif" ALT="extended by "><B>weka.estimators.CheckEstimator</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></DD></DL><HR><DL><DT><PRE>public class <B>CheckEstimator</B><DT>extends java.lang.Object<DT>implements <A HREF="../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A></DL></PRE><P>Class for examining the capabilities and finding problems with  estimators. If you implement a estimator 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 estimator don't exist, but this will help find some common ones. <p/>  Typical usage: <p/> <code>java weka.estimators.CheckEstimator -W estimator_name  estimator_options </code><p/>  This class uses code from the CheckEstimatorClass ATTENTION! Current estimators can only  1. split on a nominal class attribute 2. build estimators for nominal and numeric attributes 3. build estimators independendly of the class type The functionality to test on other class and attribute types is left in big parts in the code.   CheckEstimator reports on the following: <ul>    <li> Estimator abilities       <ul>         <li> Possible command line options to the estimator </li>         <li> Whether the estimator can predict nominal, numeric, string,               date or relational class attributes. Warnings will be displayed if               performance is worse than ZeroR </li>         <li> Whether the estimator can be trained incrementally </li>         <li> Whether the estimator can build estimates for numeric attributes </li>         <li> Whether the estimator can handle nominal attributes </li>         <li> Whether the estimator can handle string attributes </li>         <li> Whether the estimator can handle date attributes </li>         <li> Whether the estimator can handle relational  attributes </li>         <li> Whether the estimator build estimates for multi-instance data </li>         <li> Whether the estimator can handle missing attribute values </li>         <li> Whether the estimator can handle missing class values </li>         <li> Whether a nominal estimator only handles 2 class problems </li>         <li> Whether the estimator can handle instance weights </li>      </ul>    </li>    <li> Correct functioning       <ul>         <li> Correct initialisation during addvalues (i.e. no result              changes when addValues called repeatedly) </li>         <li> Whether incremental training produces the same results              as during non-incremental training (which may or may not               be OK) </li>         <li> Whether the estimator alters the data pased to it               (number of instances, instance order, instance weights, etc) </li>      </ul>    </li>    <li> Degenerate cases       <ul>         <li> building estimator with zero training instances </li>         <li> all but one attribute attribute values missing </li>         <li> all attribute attribute values missing </li>         <li> all but one class values missing </li>         <li> all class values missing </li>      </ul>    </li> </ul> Running CheckEstimator with the debug option set will output the  training and test datasets for any failed tests.<p/> The <code>weka.estimators.AbstractEstimatorTest</code> uses this class to test all the estimators. Any changes here, have to be  checked in that abstract test class, too. <p/> <!-- options-start --> Valid options are: <p/>  <pre> -D  Turn on debugging output.</pre>  <pre> -S  Silent mode - prints nothing to stdout.</pre>  <pre> -N &lt;num&gt;  The number of instances in the datasets (default 100).</pre>  <pre> -W  Full name of the estimator analysed.  eg: weka.estimators.bayes.NaiveBayes</pre>  <pre>  Options specific to estimator weka.estimators.rules.ZeroR: </pre>  <pre> -D  If set, estimator is run in debug mode and  may output additional info to the console</pre>  <!-- options-end --> Options after -- are passed to the designated estimator.<p/><P><P><DL><DT><B>Version:</B></DT>  <DD>$Revision: 1.2 $</DD><DT><B>Author:</B></DT>  <DD>Len Trigg (trigg@cs.waikato.ac.nz), FracPete (fracpete at waikato dot ac dot nz)</DD><DT><B>See Also:</B><DD><A HREF="../../weka/core/TestInstances.html" title="class in weka.core"><CODE>TestInstances</CODE></A></DL><HR><P><!-- ======== NESTED CLASS SUMMARY ======== --><A NAME="nested_class_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Nested Class Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.AttrTypes.html" title="class in weka.estimators">CheckEstimator.AttrTypes</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;class that contains info about the attribute types the estimator can estimate estimator work on one attribute only</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.EstTypes.html" title="class in weka.estimators">CheckEstimator.EstTypes</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;public class that contains info about the chosen attribute type estimator work on one attribute only</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;class</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.PostProcessor.html" title="class in weka.estimators">CheckEstimator.PostProcessor</A></B></CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;a class for postprocessing the test-data</TD></TR></TABLE>&nbsp;<!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#CheckEstimator()">CheckEstimator</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#doTests()">doTests</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Begin the tests, reporting results to System.out</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getDebug()">getDebug</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get whether debugging is turned on</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../weka/estimators/Estimator.html" title="class in weka.estimators">Estimator</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getEstimator()">getEstimator</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the estimator used as the estimator</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getMinMax(weka.core.Instances, int, double[])">getMinMax</A></B>(<A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;inst,          int&nbsp;attrIndex,          double[]&nbsp;minMax)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Find the minimum and the maximum of the attribute and return it in  the last parameter..</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getNumInstances()">getNumInstances</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current number of instances to use for the datasets.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getOptions()">getOptions</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the current settings of the CheckEstimator.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="../../weka/estimators/CheckEstimator.PostProcessor.html" title="class in weka.estimators">CheckEstimator.PostProcessor</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getPostProcessor()">getPostProcessor</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns the current PostProcessor, can be null</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#getSilent()">getSilent</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get whether silent mode is turned on</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#hasClasspathProblems()">hasClasspathProblems</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;returns TRUE if the estimator returned a "not in classpath" Exception</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#listOptions()">listOptions</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an enumeration describing the available options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#main(java.lang.String[])">main</A></B>(java.lang.String[]&nbsp;args)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test method for this class</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#setDebug(boolean)">setDebug</A></B>(boolean&nbsp;debug)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set debugging mode</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#setEstimator(weka.estimators.Estimator)">setEstimator</A></B>(<A HREF="../../weka/estimators/Estimator.html" title="class in weka.estimators">Estimator</A>&nbsp;newEstimator)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the estimator for boosting.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#setNumInstances(int)">setNumInstances</A></B>(int&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the number of instances to use in the datasets (some estimators might require more instances).</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#setOptions(java.lang.String[])">setOptions</A></B>(java.lang.String[]&nbsp;options)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Parses a given list of options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#setPostProcessor(weka.estimators.CheckEstimator.PostProcessor)">setPostProcessor</A></B>(<A HREF="../../weka/estimators/CheckEstimator.PostProcessor.html" title="class in weka.estimators">CheckEstimator.PostProcessor</A>&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sets the PostProcessor to use</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/estimators/CheckEstimator.html#setSilent(boolean)">setSilent</A></B>(boolean&nbsp;value)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set slient mode, i.e., no output at all to stdout</TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.Object</B></TH>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -