📄 bagging.html
字号:
</DD></DL><HR><A NAME="getBagSizePercent()"><!-- --></A><H3>getBagSizePercent</H3><PRE>public int <B>getBagSizePercent</B>()</PRE><DL><DD>Gets the size of each bag, as a percentage of the training set size.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the bag size, as a percentage.</DL></DD></DL><HR><A NAME="setBagSizePercent(int)"><!-- --></A><H3>setBagSizePercent</H3><PRE>public void <B>setBagSizePercent</B>(int newBagSizePercent)</PRE><DL><DD>Sets the size of each bag, as a percentage of the training set size.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>newBagSizePercent</CODE> - the bag size, as a percentage.</DL></DD></DL><HR><A NAME="calcOutOfBagTipText()"><!-- --></A><H3>calcOutOfBagTipText</H3><PRE>public java.lang.String <B>calcOutOfBagTipText</B>()</PRE><DL><DD>Returns the tip text for this property<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>tip text for this property suitable for displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="setCalcOutOfBag(boolean)"><!-- --></A><H3>setCalcOutOfBag</H3><PRE>public void <B>setCalcOutOfBag</B>(boolean calcOutOfBag)</PRE><DL><DD>Set whether the out of bag error is calculated.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>calcOutOfBag</CODE> - whether to calculate the out of bag error</DL></DD></DL><HR><A NAME="getCalcOutOfBag()"><!-- --></A><H3>getCalcOutOfBag</H3><PRE>public boolean <B>getCalcOutOfBag</B>()</PRE><DL><DD>Get whether the out of bag error is calculated.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>whether the out of bag error is calculated</DL></DD></DL><HR><A NAME="measureOutOfBagError()"><!-- --></A><H3>measureOutOfBagError</H3><PRE>public double <B>measureOutOfBagError</B>()</PRE><DL><DD>Gets the out of bag error that was calculated as the classifier was built.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the out of bag error</DL></DD></DL><HR><A NAME="enumerateMeasures()"><!-- --></A><H3>enumerateMeasures</H3><PRE>public java.util.Enumeration <B>enumerateMeasures</B>()</PRE><DL><DD>Returns an enumeration of the additional measure names.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html#enumerateMeasures()">enumerateMeasures</A></CODE> in interface <CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of the measure names</DL></DD></DL><HR><A NAME="getMeasure(java.lang.String)"><!-- --></A><H3>getMeasure</H3><PRE>public double <B>getMeasure</B>(java.lang.String additionalMeasureName)</PRE><DL><DD>Returns the value of the named measure.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html#getMeasure(java.lang.String)">getMeasure</A></CODE> in interface <CODE><A HREF="../../../weka/core/AdditionalMeasureProducer.html" title="interface in weka.core">AdditionalMeasureProducer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>additionalMeasureName</CODE> - the name of the measure to query for its value<DT><B>Returns:</B><DD>the value of the named measure<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the named measure is not supported</DL></DD></DL><HR><A NAME="resampleWithWeights(weka.core.Instances, java.util.Random, boolean[])"><!-- --></A><H3>resampleWithWeights</H3><PRE>public final <A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> <B>resampleWithWeights</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, java.util.Random random, boolean[] sampled)</PRE><DL><DD>Creates a new dataset of the same size using random sampling with replacement according to the given weight vector. The weights of the instances in the new dataset are set to one. The length of the weight vector has to be the same as the number of instances in the dataset, and all weights have to be positive.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the data to be sampled from<DD><CODE>random</CODE> - a random number generator<DD><CODE>sampled</CODE> - indicating which instance has been sampled<DT><B>Returns:</B><DD>the new dataset<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if the weights array is of the wrong length or contains negative weights.</DL></DD></DL><HR><A NAME="buildClassifier(weka.core.Instances)"><!-- --></A><H3>buildClassifier</H3><PRE>public void <B>buildClassifier</B>(<A HREF="../../../weka/core/Instances.html" title="class in weka.core">Instances</A> data) throws java.lang.Exception</PRE><DL><DD>Bagging method.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/IteratedSingleClassifierEnhancer.html#buildClassifier(weka.core.Instances)">buildClassifier</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/IteratedSingleClassifierEnhancer.html" title="class in weka.classifiers">IteratedSingleClassifierEnhancer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - the training data to be used for generating the bagged classifier.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the classifier could not be built successfully</DL></DD></DL><HR><A NAME="distributionForInstance(weka.core.Instance)"><!-- --></A><H3>distributionForInstance</H3><PRE>public double[] <B>distributionForInstance</B>(<A HREF="../../../weka/core/Instance.html" title="class in weka.core">Instance</A> instance) throws java.lang.Exception</PRE><DL><DD>Calculates the class membership probabilities for the given test instance.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../weka/classifiers/Classifier.html#distributionForInstance(weka.core.Instance)">distributionForInstance</A></CODE> in class <CODE><A HREF="../../../weka/classifiers/Classifier.html" title="class in weka.classifiers">Classifier</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance to be classified<DT><B>Returns:</B><DD>preedicted class probability distribution<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if distribution can't be computed successfully</DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Returns description of the bagged classifier.<P><DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>description of the bagged classifier as a string</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] argv)</PRE><DL><DD>Main method for testing this class.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>argv</CODE> - the options</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> </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> <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> </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/meta/AttributeSelectedClassifier.html" title="class in weka.classifiers.meta"><B>PREV CLASS</B></A> <A HREF="../../../weka/classifiers/meta/ClassificationViaRegression.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/Bagging.html" target="_top"><B>FRAMES</B></A> <A HREF="Bagging.html" target="_top"><B>NO FRAMES</B></A> <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: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <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 + -