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

📄 gridsearch.html

📁 weka是机器学习和数据挖掘领域最有影响力的开源项目之一
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<!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:44 NZDT 2007 --><TITLE>GridSearch</TITLE><META NAME="keywords" CONTENT="weka.classifiers.meta.GridSearch class"><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style"><SCRIPT type="text/javascript">function windowTitle(){    parent.document.title="GridSearch";}</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;<A HREF="../../../weka/classifiers/meta/Grading.html" title="class in weka.classifiers.meta"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../weka/classifiers/meta/LogitBoost.html" title="class in weka.classifiers.meta"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?weka/classifiers/meta/GridSearch.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="GridSearch.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;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&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;<A HREF="#field_detail">FIELD</A>&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.classifiers.meta</FONT><BR>Class GridSearch</H2><PRE>java.lang.Object  <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">weka.classifiers.Classifier</A>      <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../weka/classifiers/SingleClassifierEnhancer.html" title="class in weka.classifiers">weka.classifiers.SingleClassifierEnhancer</A>          <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><A HREF="../../../weka/classifiers/RandomizableSingleClassifierEnhancer.html" title="class in weka.classifiers">weka.classifiers.RandomizableSingleClassifierEnhancer</A>              <IMG SRC="../../../resources/inherit.gif" ALT="extended by "><B>weka.classifiers.meta.GridSearch</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable, java.lang.Cloneable, <A HREF="../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A>, <A HREF="../../../weka/core/CapabilitiesHandler.html" title="interface in weka.core">CapabilitiesHandler</A>, <A HREF="../../../weka/core/OptionHandler.html" title="interface in weka.core">OptionHandler</A>, <A HREF="../../../weka/core/Randomizable.html" title="interface in weka.core">Randomizable</A></DD></DL><HR><DL><DT><PRE>public class <B>GridSearch</B><DT>extends <A HREF="../../../weka/classifiers/RandomizableSingleClassifierEnhancer.html" title="class in weka.classifiers">RandomizableSingleClassifierEnhancer</A><DT>implements <A HREF="../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A></DL></PRE><P><!-- globalinfo-start --> Performs a grid search of parameter pairs for the a classifier (Y-axis, default is LinearRegression with the "Ridge" parameter) and the PLSFilter (X-axis, "# of Components") and chooses the best pair found for the actual predicting.<br/> <br/> The initial grid is worked on with 2-fold CV to determine the values of the parameter pairs for the selected type of evaluation (e.g., accuracy). The best point in the grid is then taken and a 10-fold CV is performed with the adjacent parameter pairs. If a better pair is found, then this will act as new center and another 10-fold CV will be performed (kind of hill-climbing). This process is repeated until no better pair is found or the best pair is on the border of the grid.<br/> In case the best pair is on the border, one can let GridSearch automatically extend the grid and continue the search. Check out the properties 'gridIsExtendable' (option '-extend-grid') and 'maxGridExtensions' (option '-max-grid-extensions &lt;num&gt;').<br/> <br/> GridSearch can handle doubles, integers (values are just cast to int) and booleans (0 is false, otherwise true). float, char and long are supported as well.<br/> <br/> The best filter/classifier setup can be accessed after the buildClassifier call via the getBestFilter/getBestClassifier methods.<br/> Note on the implementation: after the data has been passed through the filter, a default NumericCleaner filter is applied to the data in order to avoid numbers that are getting too small and might produce NaNs in other schemes. <p/> <!-- globalinfo-end -->  <!-- options-start --> Valid options are: <p/>  <pre> -E &lt;CC|RMSE|RRSE|MAE|RAE|COMB|ACC&gt;  Determines the parameter used for evaluation:  CC = Correlation coefficient  RMSE = Root mean squared error  RRSE = Root relative squared error  MAE = Mean absolute error  RAE = Root absolute error  COMB = Combined = (1-abs(CC)) + RRSE + RAE  ACC = Accuracy  (default: CC)</pre>  <pre> -y-property &lt;option&gt;  The Y option to test (without leading dash).  (default: classifier.ridge)</pre>  <pre> -y-min &lt;num&gt;  The minimum for Y.  (default: -10)</pre>  <pre> -y-max &lt;num&gt;  The maximum for Y.  (default: +5)</pre>  <pre> -y-step &lt;num&gt;  The step size for Y.  (default: 1)</pre>  <pre> -y-base &lt;num&gt;  The base for Y.  (default: 10)</pre>  <pre> -y-expression &lt;expr&gt;  The expression for Y.  Available parameters:   BASE   FROM   TO   STEP   I - the current iteration value   (from 'FROM' to 'TO' with stepsize 'STEP')  (default: 'pow(BASE,I)')</pre>  <pre> -filter &lt;filter specification&gt;  The filter to use (on X axis). Full classname of filter to include,   followed by scheme options.  (default: weka.filters.supervised.attribute.PLSFilter)</pre>  <pre> -x-property &lt;option&gt;  The X option to test (without leading dash).  (default: filter.numComponents)</pre>  <pre> -x-min &lt;num&gt;  The minimum for X.  (default: +5)</pre>  <pre> -x-max &lt;num&gt;  The maximum for X.  (default: +20)</pre>  <pre> -x-step &lt;num&gt;  The step size for X.  (default: 1)</pre>  <pre> -x-base &lt;num&gt;  The base for X.  (default: 10)</pre>  <pre> -x-expression &lt;expr&gt;  The expression for the X value.  Available parameters:   BASE   MIN   MAX   STEP   I - the current iteration value   (from 'FROM' to 'TO' with stepsize 'STEP')  (default: 'pow(BASE,I)')</pre>  <pre> -extend-grid  Whether the grid can be extended.  (default: no)</pre>  <pre> -max-grid-extensions &lt;num&gt;  The maximum number of grid extensions (-1 is unlimited).  (default: 3)</pre>  <pre> -sample-size &lt;num&gt;  The size (in percent) of the sample to search the inital grid with.  (default: 100)</pre>  <pre> -traversal &lt;ROW-WISE|COLUMN-WISE&gt;  The type of traversal for the grid.  (default: COLUMN-WISE)</pre>  <pre> -log-file &lt;filename&gt;  The log file to log the messages to.  (default: none)</pre>  <pre> -S &lt;num&gt;  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> -W  Full name of base classifier.  (default: weka.classifiers.functions.LinearRegression)</pre>  <pre>  Options specific to classifier weka.classifiers.functions.LinearRegression: </pre>  <pre> -D  Produce debugging output.  (default no debugging output)</pre>  <pre> -S &lt;number of selection method&gt;  Set the attribute selection method to use. 1 = None, 2 = Greedy.  (default 0 = M5' method)</pre>  <pre> -C  Do not try to eliminate colinear attributes. </pre>  <pre> -R &lt;double&gt;  Set ridge parameter (default 1.0e-8). </pre>  <pre>  Options specific to filter weka.filters.supervised.attribute.PLSFilter ('-filter'): </pre>  <pre> -D  Turns on output of debugging information.</pre>  <pre> -C &lt;num&gt;  The number of components to compute.  (default: 20)</pre>  <pre> -U  Updates the class attribute as well.  (default: off)</pre>  <pre> -M  Turns replacing of missing values on.  (default: off)</pre>  <pre> -A &lt;SIMPLS|PLS1&gt;  The algorithm to use.  (default: PLS1)</pre>  <pre> -P &lt;none|center|standardize&gt;  The type of preprocessing that is applied to the data.  (default: center)</pre>  <!-- options-end --> Examples: <ul>   <li>     <b>Optimizing SMO with RBFKernel (C and gamma)</b>     <ul>       <li>Set the evaluation to <i>Accuracy</i>.</li>       <li>Set the filter to <code>weka.filters.AllFilter</code> since we           don't need any special data processing and we don't optimize the           filter in this case (data gets always passed through filter!).</li>       <li>Set <code>weka.classifiers.functions.SMO</code> as classifier           with <code>weka.classifiers.functions.supportVector.RBFKernel</code>           as kernel.       </li>       <li>Set the XProperty to "classifier.c", XMin to "1", XMax to "16",            XStep to "1" and the XExpression to "I". This will test the "C"           parameter of SMO for the values from 1 to 16.</li>       <li>Set the YProperty to "classifier.kernel.gamma", YMin to "-5",           YMax to "2", YStep to "1" YBase to "10" and YExpression to            "pow(BASE,I)". This will test the gamma of the RBFKernel with the           values 10^-5, 10^-4,..,10^2.</li>     </ul>   </li>   <li>     <b>Optimizing PLSFilter with LinearRegression (# of components and ridge) - default setup</b>     <ul>       <li>Set the evaluation to <i>Correlation coefficient</i>.</li>       <li>Set the filter to <code>weka.filters.supervised.attribute.PLSFilter</code>.</li>       <li>Set <code>weka.classifiers.functions.LinearRegression</code> as            classifier and use no attribute selection and no elimination of

⌨️ 快捷键说明

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