📄 clusterevaluation.html
字号:
public <B>ClusterEvaluation</B>()</PRE><DL><DD>Constructor. Sets defaults for each member variable. Default Clusterer is EM.<P></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><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" title="class in weka.clusterers">Clusterer</A> clusterer)</PRE><DL><DD>set the clusterer<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>clusterer</CODE> - the clusterer to use</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.<P><DD><DL></DL></DD><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<P><DD><DL></DL></DD><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.<P><DD><DL></DL></DD><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<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an array of class to cluster mappings</DL></DD></DL><HR><A NAME="getLogLikelihood()"><!-- --></A><H3>getLogLikelihood</H3><PRE>public double <B>getLogLikelihood</B>()</PRE><DL><DD>Return the log likelihood corresponding to the most recent set of instances clustered.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>double</code> value</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" title="class in weka.core">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<P><DD><DL></DL></DD><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" title="class in weka.clusterers">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.<P><DD><DL></DL></DD><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(weka.clusterers.DensityBasedClusterer, weka.core.Instances, int, java.util.Random)"><!-- --></A><H3>crossValidateModel</H3><PRE>public static double <B>crossValidateModel</B>(<A HREF="../../weka/clusterers/DensityBasedClusterer.html" title="class in weka.clusterers">DensityBasedClusterer</A> clusterer, <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, int numFolds, java.util.Random random) throws java.lang.Exception</PRE><DL><DD>Perform a cross-validation for DensityBasedClusterer on a set of instances.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>clusterer</CODE> - the clusterer to use<DD><CODE>data</CODE> - the training data<DD><CODE>numFolds</CODE> - number of folds of cross validation to perform<DD><CODE>random</CODE> - random number seed for cross-validation<DT><B>Returns:</B><DD>the cross-validated log-likelihood<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if an error occurs</DL></DD></DL><HR><A NAME="crossValidateModel(java.lang.String, weka.core.Instances, int, java.lang.String[], java.util.Random)"><!-- --></A><H3>crossValidateModel</H3><PRE>public static java.lang.String <B>crossValidateModel</B>(java.lang.String clustererString, <A HREF="../../weka/core/Instances.html" title="class in weka.core">Instances</A> data, int numFolds, java.lang.String[] options, java.util.Random random) throws java.lang.Exception</PRE><DL><DD>Performs a cross-validation for a DensityBasedClusterer clusterer on a set of instances.<P><DD><DL></DL></DD><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<DD><CODE>random</CODE> - a random number generator<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.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>args</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=3 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="../../../Tutorial.pdf"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="http://www.cs.waikato.ac.nz/ml/weka/index.html"><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/clusterers/Clusterer.html" title="class in weka.clusterers"><B>PREV CLASS</B></A> <A HREF="../../weka/clusterers/Cobweb.html" title="class in weka.clusterers"><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> <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 + -