📄 em.html
字号:
displaying in the explorer/experimenter gui</DL></DD></DL><HR><A NAME="setNumClusters(int)"><!-- --></A><H3>setNumClusters</H3><PRE>public void <B>setNumClusters</B>(int n) throws java.lang.Exception</PRE><DL><DD>Set the number of clusters (-1 to select by CV).<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the number of clusters<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if n is 0</DL></DD></DL><HR><A NAME="getNumClusters()"><!-- --></A><H3>getNumClusters</H3><PRE>public int <B>getNumClusters</B>()</PRE><DL><DD>Get the number of clusters<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of clusters.</DL></DD></DL><HR><A NAME="maxIterationsTipText()"><!-- --></A><H3>maxIterationsTipText</H3><PRE>public java.lang.String <B>maxIterationsTipText</B>()</PRE><DL><DD>Returns the tip text for this property<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="setMaxIterations(int)"><!-- --></A><H3>setMaxIterations</H3><PRE>public void <B>setMaxIterations</B>(int i) throws java.lang.Exception</PRE><DL><DD>Set the maximum number of iterations to perform<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the number of iterations<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if i is less than 1</DL></DD></DL><HR><A NAME="getMaxIterations()"><!-- --></A><H3>getMaxIterations</H3><PRE>public int <B>getMaxIterations</B>()</PRE><DL><DD>Get the maximum number of iterations<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of iterations</DL></DD></DL><HR><A NAME="setDebug(boolean)"><!-- --></A><H3>setDebug</H3><PRE>public void <B>setDebug</B>(boolean v)</PRE><DL><DD>Set debug mode - verbose output<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>v</CODE> - true for verbose output</DL></DD></DL><HR><A NAME="getDebug()"><!-- --></A><H3>getDebug</H3><PRE>public boolean <B>getDebug</B>()</PRE><DL><DD>Get debug mode<DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>true if debug mode is set</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 EM.<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></DL><HR><A NAME="resetOptions()"><!-- --></A><H3>resetOptions</H3><PRE>protected void <B>resetOptions</B>()</PRE><DL><DD>Reset to default options<DD><DL></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public java.lang.String <B>toString</B>()</PRE><DL><DD>Outputs the generated clusters into a string.<DD><DL><DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL></DD></DL><HR><A NAME="numberOfClusters()"><!-- --></A><H3>numberOfClusters</H3><PRE>public int <B>numberOfClusters</B>() throws java.lang.Exception</PRE><DL><DD>Returns the number of clusters.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/clusterers/Clusterer.html#numberOfClusters()">numberOfClusters</A></CODE> in class <CODE><A HREF="../../weka/clusterers/Clusterer.html">Clusterer</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of clusters generated for a training dataset.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if number of clusters could not be returned successfully</DL></DD></DL><HR><A NAME="buildClusterer(weka.core.Instances)"><!-- --></A><H3>buildClusterer</H3><PRE>public void <B>buildClusterer</B>(<A HREF="../../weka/core/Instances.html">Instances</A> data) throws java.lang.Exception</PRE><DL><DD>Generates a clusterer. Has to initialize all fields of the clusterer that are not being set via options.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/clusterers/Clusterer.html#buildClusterer(weka.core.Instances)">buildClusterer</A></CODE> in class <CODE><A HREF="../../weka/clusterers/Clusterer.html">Clusterer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - set of instances serving as training data<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the clusterer has not been generated successfully</DL></DD></DL><HR><A NAME="densityForInstance(weka.core.Instance)"><!-- --></A><H3>densityForInstance</H3><PRE>public double <B>densityForInstance</B>(<A HREF="../../weka/core/Instance.html">Instance</A> inst) throws java.lang.Exception</PRE><DL><DD>Computes the density for a given instance.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/clusterers/DistributionClusterer.html#densityForInstance(weka.core.Instance)">densityForInstance</A></CODE> in class <CODE><A HREF="../../weka/clusterers/DistributionClusterer.html">DistributionClusterer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - the instance to compute the density for<DT><B>Returns:</B><DD>the density.<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if the density could not be computed 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">Instance</A> inst) throws java.lang.Exception</PRE><DL><DD>Predicts the cluster memberships for a given instance.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../weka/clusterers/DistributionClusterer.html#distributionForInstance(weka.core.Instance)">distributionForInstance</A></CODE> in class <CODE><A HREF="../../weka/clusterers/DistributionClusterer.html">DistributionClusterer</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>data</CODE> - set of test instances<DD><CODE>instance</CODE> - the instance to be assigned a cluster.<DT><B>Returns:</B><DD>an array containing the estimated membership probabilities of the test instance in each cluster (this should sum to at most 1)<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if distribution could not be computed successfully</DL></DD></DL><HR><A NAME="weightsForInstance(weka.core.Instance)"><!-- --></A><H3>weightsForInstance</H3><PRE>protected double[] <B>weightsForInstance</B>(<A HREF="../../weka/core/Instance.html">Instance</A> inst) throws java.lang.Exception</PRE><DL><DD>Returns the weights (indicating cluster membership) for a given instance<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>inst</CODE> - the instance to be assigned a cluster<DT><B>Returns:</B><DD>an array of weights<DT><B>Throws:</B><DD><CODE>java.lang.Exception</CODE> - if weights could not be computed</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.<DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>argv</CODE> - should contain the following arguments: <p> -t training file [-T test file] [-N number of clusters] [-S random seed]</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/DistributionMetaClusterer.html"><B>PREV CLASS</B></A> <A HREF="../../weka/clusterers/SimpleKMeans.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="EM.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 + -