📄 clusterevaluation.html
字号:
</TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= 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="ClusterEvaluation()"><!-- --></A><H3>ClusterEvaluation</H3><PRE>public <B>ClusterEvaluation</B>()</PRE><DL><DD>Constructor. Sets defaults for each member variable. Default Clusterer is EM.</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="setClusterer(weka.clusterers.Clusterer)"><!-- --></A><H3>setClusterer</H3><PRE>public void <B>setClusterer</B>(<A HREF="../../weka/clusterers/Clusterer.html">Clusterer</A> clusterer)</PRE><DL><DD>set the clusterer<DD><DL><DT><B>Parameters:</B><DD><CODE>clusterer</CODE> - the clusterer to use</DL></DD></DL><HR><A NAME="setDoXval(boolean)"><!-- --></A><H3>setDoXval</H3><PRE>public void <B>setDoXval</B>(boolean x)</PRE><DL><DD>set whether or not to do cross validation<DD><DL><DT><B>Parameters:</B><DD><CODE>x</CODE> - true if cross validation is to be done</DL></DD></DL><HR><A NAME="setFolds(int)"><!-- --></A><H3>setFolds</H3><PRE>public void <B>setFolds</B>(int folds)</PRE><DL><DD>set the number of folds to use for cross validation<DD><DL><DT><B>Parameters:</B><DD><CODE>folds</CODE> - the number of folds</DL></DD></DL><HR><A NAME="setSeed(int)"><!-- --></A><H3>setSeed</H3><PRE>public void <B>setSeed</B>(int s)</PRE><DL><DD>set the seed to use for cross validation<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the seed.</DL></DD></DL><HR><A NAME="clusterResultsToString()"><!-- --></A><H3>clusterResultsToString</H3><PRE>public java.lang.String <B>clusterResultsToString</B>()</PRE><DL><DD>return the results of clustering.<DD><DL><DT><B>Returns:</B><DD>a string detailing the results of clustering a data set</DL></DD></DL><HR><A NAME="getNumClusters()"><!-- --></A><H3>getNumClusters</H3><PRE>public int <B>getNumClusters</B>()</PRE><DL><DD>Return the number of clusters found for the most recent call to evaluateClusterer<DD><DL><DT><B>Returns:</B><DD>the number of clusters found</DL></DD></DL><HR><A NAME="getClusterAssignments()"><!-- --></A><H3>getClusterAssignments</H3><PRE>public double[] <B>getClusterAssignments</B>()</PRE><DL><DD>Return an array of cluster assignments corresponding to the most recent set of instances clustered.<DD><DL><DT><B>Returns:</B><DD>an array of cluster assignments</DL></DD></DL><HR><A NAME="getClassesToClusters()"><!-- --></A><H3>getClassesToClusters</H3><PRE>public int[] <B>getClassesToClusters</B>()</PRE><DL><DD>Return the array (ordered by cluster number) of minimum error class to cluster mappings<DD><DL><DT><B>Returns:</B><DD>an array of class to cluster mappings</DL></DD></DL><HR><A NAME="evaluateClusterer(weka.core.Instances)"><!-- --></A><H3>evaluateClusterer</H3><PRE>public void <B>evaluateClusterer</B>(<A HREF="../../weka/core/Instances.html">Instances</A> test) throws java.lang.Exception</PRE><DL><DD>Evaluate the clusterer on a set of instances. Calculates clustering statistics and stores cluster assigments for the instances in m_clusterAssignments<DD><DL><DT><B>Parameters:</B><DD><CODE>test</CODE> - the set of instances to cluster<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if something goes wrong</DL></DD></DL><HR><A NAME="evaluateClusterer(weka.clusterers.Clusterer, java.lang.String[])"><!-- --></A><H3>evaluateClusterer</H3><PRE>public static java.lang.String <B>evaluateClusterer</B>(<A HREF="../../weka/clusterers/Clusterer.html">Clusterer</A> clusterer, java.lang.String[] options) throws java.lang.Exception</PRE><DL><DD>Evaluates a clusterer with the options given in an array of strings. It takes the string indicated by "-t" as training file, the string indicated by "-T" as test file. If the test file is missing, a stratified ten-fold cross-validation is performed (distribution clusterers only). Using "-x" you can change the number of folds to be used, and using "-s" the random seed. If the "-p" option is present it outputs the classification for each test instance. If you provide the name of an object file using "-l", a clusterer will be loaded from the given file. If you provide the name of an object file using "-d", the clusterer built from the training data will be saved to the given file.<DD><DL><DT><B>Parameters:</B><DD><CODE>clusterer</CODE> - machine learning clusterer<DD><CODE>options</CODE> - the array of string containing the options<DT><B>Returns:</B><DD>a string describing the results<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if model could not be evaluated successfully</DL></DD></DL><HR><A NAME="crossValidateModel(java.lang.String, weka.core.Instances, int, java.lang.String[])"><!-- --></A><H3>crossValidateModel</H3><PRE>public static java.lang.String <B>crossValidateModel</B>(java.lang.String clustererString, <A HREF="../../weka/core/Instances.html">Instances</A> data, int numFolds, java.lang.String[] options) throws java.lang.Exception</PRE><DL><DD>Performs a cross-validation for a distribution clusterer on a set of instances.<DD><DL><DT><B>Parameters:</B><DD><CODE>clustererString</CODE> - a string naming the class of the clusterer<DD><CODE>data</CODE> - the data on which the cross-validation is to be performed<DD><CODE>numFolds</CODE> - the number of folds for the cross-validation<DD><CODE>options</CODE> - the options to the clusterer<DT><B>Returns:</B><DD>a string containing the cross validated log likelihood<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if a clusterer could not be generated</DL></DD></DL><HR><A NAME="main(java.lang.String[])"><!-- --></A><H3>main</H3><PRE>public static void <B>main</B>(java.lang.String[] args)</PRE><DL><DD>Main method for testing this class.<DD><DL><DT><B>Parameters:</B><DD><CODE>args</CODE> - the options</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <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> </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/clusterers/Clusterer.html"><B>PREV CLASS</B></A> <A HREF="../../weka/clusterers/Cobweb.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="ClusterEvaluation.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | 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><!-- =========== END OF NAVBAR =========== --><HR></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -