📄 metacost.html
字号:
<BR> Returns the directory that will be searched for cost files when loading on demand.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#getOptions()">getOptions</A></B>()</CODE><BR> Gets the current settings of the Classifier.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#getSeed()">getSeed</A></B>()</CODE><BR> Get seed for resampling.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.util.Enumeration</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#listOptions()">listOptions</A></B>()</CODE><BR> 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 void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#main(java.lang.String[])">main</A></B>(java.lang.String[] argv)</CODE><BR> Main method for testing this class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setBagSizePercent(int)">setBagSizePercent</A></B>(int newBagSizePercent)</CODE><BR> Sets the size of each bag, as a percentage of the training set size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setClassifier(weka.classifiers.Classifier)">setClassifier</A></B>(<A HREF="../../weka/classifiers/Classifier.html">Classifier</A> classifier)</CODE><BR> Sets the distribution classifier</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setCostMatrix(weka.classifiers.CostMatrix)">setCostMatrix</A></B>(<A HREF="../../weka/classifiers/CostMatrix.html">CostMatrix</A> newCostMatrix)</CODE><BR> Sets the misclassification cost matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setCostMatrixSource(weka.core.SelectedTag)">setCostMatrixSource</A></B>(<A HREF="../../weka/core/SelectedTag.html">SelectedTag</A> newMethod)</CODE><BR> Sets the source location of the cost matrix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setNumIterations(int)">setNumIterations</A></B>(int numIterations)</CODE><BR> Sets the number of bagging iterations</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setOnDemandDirectory(java.io.File)">setOnDemandDirectory</A></B>(java.io.File newDir)</CODE><BR> Sets the directory that will be searched for cost files when loading on demand.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setOptions(java.lang.String[])">setOptions</A></B>(java.lang.String[] options)</CODE><BR> Parses a given list of options.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#setSeed(int)">setSeed</A></B>(int seed)</CODE><BR> Set seed for resampling.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../weka/classifiers/MetaCost.html#toString()">toString</A></B>()</CODE><BR> Output a representation of this classifier</TD></TR></TABLE> <A NAME="methods_inherited_from_class_weka.classifiers.Classifier"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class weka.classifiers.<A HREF="../../weka/classifiers/Classifier.html">Classifier</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../weka/classifiers/Classifier.html#forName(java.lang.String, java.lang.String[])">forName</A>, <A HREF="../../weka/classifiers/Classifier.html#makeCopies(weka.classifiers.Classifier, int)">makeCopies</A></CODE></TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="MATRIX_ON_DEMAND"><!-- --></A><H3>MATRIX_ON_DEMAND</H3><PRE>public static final int <B>MATRIX_ON_DEMAND</B></PRE><DL></DL><HR><A NAME="MATRIX_SUPPLIED"><!-- --></A><H3>MATRIX_SUPPLIED</H3><PRE>public static final int <B>MATRIX_SUPPLIED</B></PRE><DL></DL><HR><A NAME="TAGS_MATRIX_SOURCE"><!-- --></A><H3>TAGS_MATRIX_SOURCE</H3><PRE>public static final <A HREF="../../weka/core/Tag.html">Tag</A>[] <B>TAGS_MATRIX_SOURCE</B></PRE><DL></DL><HR><A NAME="m_MatrixSource"><!-- --></A><H3>m_MatrixSource</H3><PRE>protected int <B>m_MatrixSource</B></PRE><DL><DD>Indicates the current cost matrix source</DL><HR><A NAME="m_OnDemandDirectory"><!-- --></A><H3>m_OnDemandDirectory</H3><PRE>protected java.io.File <B>m_OnDemandDirectory</B></PRE><DL><DD>The directory used when loading cost files on demand, null indicates current directory</DL><HR><A NAME="m_CostFile"><!-- --></A><H3>m_CostFile</H3><PRE>protected java.lang.String <B>m_CostFile</B></PRE><DL><DD>The name of the cost file, for command line options</DL><HR><A NAME="m_Classifier"><!-- --></A><H3>m_Classifier</H3><PRE>protected <A HREF="../../weka/classifiers/Classifier.html">Classifier</A> <B>m_Classifier</B></PRE><DL><DD>The classifier</DL><HR><A NAME="m_CostMatrix"><!-- --></A><H3>m_CostMatrix</H3><PRE>protected <A HREF="../../weka/classifiers/CostMatrix.html">CostMatrix</A> <B>m_CostMatrix</B></PRE><DL><DD>The cost matrix</DL><HR><A NAME="m_NumIterations"><!-- --></A><H3>m_NumIterations</H3><PRE>protected int <B>m_NumIterations</B></PRE><DL><DD>The number of iterations.</DL><HR><A NAME="m_Seed"><!-- --></A><H3>m_Seed</H3><PRE>protected int <B>m_Seed</B></PRE><DL><DD>Seed for reweighting using resampling.</DL><HR><A NAME="m_BagSizePercent"><!-- --></A><H3>m_BagSizePercent</H3><PRE>protected int <B>m_BagSizePercent</B></PRE><DL><DD>The size of each bag sample, as a percentage of the training size</DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="MetaCost()"><!-- --></A><H3>MetaCost</H3><PRE>public <B>MetaCost</B>()</PRE><DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="listOptions()"><!-- --></A><H3>listOptions</H3><PRE>public java.util.Enumeration <B>listOptions</B>()</PRE><DL><DD>Returns an enumeration describing the available options<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../weka/core/OptionHandler.html#listOptions()">listOptions</A></CODE> in interface <CODE><A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an enumeration of all the available options</DL></DD></DL><HR><A NAME="setOptions(java.lang.String[])"><!-- --></A><H3>setOptions</H3><PRE>public void <B>setOptions</B>(java.lang.String[] options) throws java.lang.Exception</PRE><DL><DD>Parses a given list of options. Valid options are:<p> -W classname <br> Specify the full class name of a classifier (required).<p> -C cost file <br> File name of a cost matrix to use. If this is not supplied, a cost matrix will be loaded on demand. The name of the on-demand file is the relation name of the training data plus ".cost", and the path to the on-demand file is specified with the -D option.<p> -D directory <br> Name of a directory to search for cost files when loading costs on demand (default current directory). <p> -I num <br> Set the number of bagging iterations (default 10). <p> -S seed <br> Random number seed used when reweighting by resampling (default 1).<p> -P num <br> Size of each bag, as a percentage of the training size (default 100). <p> Options after -- are passed to the designated classifier.<p><DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../weka/core/OptionHandler.html#setOptions(java.lang.String[])">setOptions</A></CODE> in interface <CODE><A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>options</CODE> - the list of options as an array of strings<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an option is not supported</DL></DD></DL><HR><A NAME="getOptions()"><!-- --></A><H3>getOptions</H3><PRE>public java.lang.String[] <B>getOptions</B>()</PRE><DL><DD>Gets the current settings of the Classifier.<DD><DL><DT><B>Specified by: </B><DD><CODE><A HREF="../../weka/core/OptionHandler.html#getOptions()">getOptions</A></CODE> in interface <CODE><A HREF="../../weka/core/OptionHandler.html">OptionHandler</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of strings suitable for passing to setOptions</DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -