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

📄 modelbag.html

📁 weka是机器学习和数据挖掘领域最有影响力的开源项目之一
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ModelBag(double[][][], double, boolean)"><!-- --></A><H3>ModelBag</H3><PRE>public <B>ModelBag</B>(double[][][]&nbsp;models,                double&nbsp;bag_percent,                boolean&nbsp;debug)</PRE><DL><DD>Constructor for ModelBag.<P><DL><DT><B>Parameters:</B><DD><CODE>models</CODE> - The complete set of models from which to draw our bag. First            index is for the model, second is for the instance. The last            is a prediction distribution for that instance. Models are            represented by this array of predictions for validation data,            since that's all ensemble selection needs to know.<DD><CODE>bag_percent</CODE> - The percentage of the set of given models that should be used            in the Model Bag.<DD><CODE>debug</CODE> - Whether the ModelBag should print debug information.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="shuffle(java.util.Random)"><!-- --></A><H3>shuffle</H3><PRE>public void <B>shuffle</B>(java.util.Random&nbsp;rand)</PRE><DL><DD>Shuffle the models. The order in m_models is preserved, but we change our virtual indexes around.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>rand</CODE> - the random number generator to use</DL></DD></DL><HR><A NAME="sortInitialize(int, boolean, weka.core.Instances, int)"><!-- --></A><H3>sortInitialize</H3><PRE>public int[] <B>sortInitialize</B>(int&nbsp;num,                            boolean&nbsp;greedy,                            <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instances,                            int&nbsp;metric)                     throws java.lang.Exception</PRE><DL><DD>Sort initialize the bag.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>num</CODE> - the Maximum number of models to initialize with<DD><CODE>greedy</CODE> - True if we do greedy addition, up to num. Greedy sort            initialization adds models (up to num) in order of best to            worst performance until performance no longer improves.<DD><CODE>instances</CODE> - the data set (needed for performance evaluation)<DD><CODE>metric</CODE> - metric for which to optimize. See EnsembleMetricHelper<DT><B>Returns:</B><DD>returns an array of indexes which were selected, in order         starting from the model with best performance.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="weightAll(int)"><!-- --></A><H3>weightAll</H3><PRE>public void <B>weightAll</B>(int&nbsp;weight)</PRE><DL><DD>Add "weight" to the number of times each model in the bag was chosen. Typically for use with backward elimination.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>weight</CODE> - the weight to add</DL></DD></DL><HR><A NAME="forwardSelect(boolean, weka.core.Instances, int)"><!-- --></A><H3>forwardSelect</H3><PRE>public void <B>forwardSelect</B>(boolean&nbsp;withReplacement,                          <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instances,                          int&nbsp;metric)                   throws java.lang.Exception</PRE><DL><DD>Forward select one model. Will add the model which has the best effect on performance. If replacement is false, and all models are chosen, no action is taken. If a model can be added, one always is (even if it hurts performance).<P><DD><DL><DT><B>Parameters:</B><DD><CODE>withReplacement</CODE> - whether a model can be added more than once.<DD><CODE>instances</CODE> - The dataset, for calculating performance.<DD><CODE>metric</CODE> - The metric to which we will optimize. See EnsembleMetricHelper<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="backwardEliminate(weka.core.Instances, int)"><!-- --></A><H3>backwardEliminate</H3><PRE>public void <B>backwardEliminate</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instances,                              int&nbsp;metric)                       throws java.lang.Exception</PRE><DL><DD>Find the model whose removal will help the ensemble's performance the most, and remove it. If there is only one model left, we leave it in. If we can remove a model, we always do, even if it hurts performance.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - The data set, for calculating performance<DD><CODE>metric</CODE> - Metric to optimize for. See EnsembleMetricHelper.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="forwardSelectOrBackwardEliminate(boolean, weka.core.Instances, int)"><!-- --></A><H3>forwardSelectOrBackwardEliminate</H3><PRE>public void <B>forwardSelectOrBackwardEliminate</B>(boolean&nbsp;with_replacement,                                             <A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instances,                                             int&nbsp;metric)                                      throws java.lang.Exception</PRE><DL><DD>Find the best action to perform, be it adding a model or removing a model, and perform it. Some action is always performed, even if it hurts performance.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>with_replacement</CODE> - whether we can add a model more than once<DD><CODE>instances</CODE> - The dataset, for determining performance.<DD><CODE>metric</CODE> - The metric for which to optimize. See EnsembleMetricHelper.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="getModelWeights()"><!-- --></A><H3>getModelWeights</H3><PRE>public int[] <B>getModelWeights</B>()</PRE><DL><DD>returns the model weights<P><DD><DL><DT><B>Returns:</B><DD>the model weights</DL></DD></DL><HR><A NAME="getIndividualPerformance(weka.core.Instances, int)"><!-- --></A><H3>getIndividualPerformance</H3><PRE>public double[] <B>getIndividualPerformance</B>(<A HREF="../../../../weka/core/Instances.html" title="class in weka.core">Instances</A>&nbsp;instances,                                         int&nbsp;metric)                                  throws java.lang.Exception</PRE><DL><DD>Gets the individual performances of all the models in the bag.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>instances</CODE> - The validation data, for which we want performance.<DD><CODE>metric</CODE> - The desired metric (see EnsembleMetricHelper).<DT><B>Returns:</B><DD>the performance<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" 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_bottom_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/ensembleSelection/EnsembleSelectionLibraryModel.html" title="class in weka.classifiers.meta.ensembleSelection"><B>PREV CLASS</B></A>&nbsp;&nbsp;NEXT CLASS</FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../../index.html?weka/classifiers/meta/ensembleSelection/ModelBag.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ModelBag.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;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_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR></BODY></HTML>

⌨️ 快捷键说明

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