<AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/KMeans.html"title="class in org.gcube.dataanalysis.ecoengine.clustering"><B>PREV CLASS</B></A>
<AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeansWrapper.html"title="class in org.gcube.dataanalysis.ecoengine.clustering"><B>NEXT CLASS</B></A></FONT></TD>
<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">java.lang.Object</A>
<IMGSRC="../../../../../resources/inherit.gif"ALT="extended by ">weka.clusterers.AbstractClusterer
<IMGSRC="../../../../../resources/inherit.gif"ALT="extended by ">weka.clusterers.RandomizableClusterer
<IMGSRC="../../../../../resources/inherit.gif"ALT="extended by "><B>org.gcube.dataanalysis.ecoengine.clustering.XMeans</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B><DD><AHREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true"title="class or interface in java.io">Serializable</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Cloneable.html?is-external=true"title="class or interface in java.lang">Cloneable</A>, weka.clusterers.Clusterer, weka.core.CapabilitiesHandler, weka.core.OptionHandler, weka.core.Randomizable, weka.core.RevisionHandler, weka.core.TechnicalInformationHandler</DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>XMeans</B><DT>extends weka.clusterers.RandomizableClusterer<DT>implements weka.core.TechnicalInformationHandler</DL>
</PRE>
<P>
<!-- globalinfo-start -->
Cluster data using the X-means algorithm.<br/>
<br/>
X-Means is K-Means extended by an Improve-Structure part In this part of the algorithm the centers are attempted to be split in its region. The decision between the children of each center and itself is done comparing the BIC-values of the two structures.<br/>
<br/>
For more information see:<br/>
<br/>
Dan Pelleg, Andrew W. Moore: X-means: Extending K-means with Efficient Estimation of the Number of Clusters. In: Seventeenth International Conference on Machine Learning, 727-734, 2000.
<p/>
<!-- globalinfo-end -->
<!-- technical-bibtex-start -->
BibTeX:
<pre>
@inproceedings{Pelleg2000,
author = {Dan Pelleg and Andrew W. Moore},
booktitle = {Seventeenth International Conference on Machine Learning},
pages = {727-734},
publisher = {Morgan Kaufmann},
title = {X-means: Extending K-means with Efficient Estimation of the Number of Clusters},
year = {2000}
}
</pre>
<p/>
<!-- technical-bibtex-end -->
<!-- options-start -->
Valid options are: <p/>
<pre> -I <num>
maximum number of overall iterations
(default 1).</pre>
<pre> -M <num>
maximum number of iterations in the kMeans loop in
the Improve-Parameter part
(default 1000).</pre>
<pre> -J <num>
maximum number of iterations in the kMeans loop
for the splitted centroids in the Improve-Structure part
(default 1000).</pre>
<pre> -L <num>
minimum number of clusters
(default 2).</pre>
<pre> -H <num>
maximum number of clusters
(default 4).</pre>
<pre> -B <value>
distance value for binary attributes
(default 1.0).</pre>
<pre> -use-kdtree
Uses the KDTree internally
(default no).</pre>
<pre> -K <KDTree class specification>
Full class name of KDTree class to use, followed
by scheme options.
eg: "weka.core.neighboursearch.kdtrees.KDTree -P"
(default no KDTree class used).</pre>
<pre> -C <value>
cutoff factor, takes the given percentage of the splitted
centroids if none of the children win
(default 0.0).</pre>
<pre> -D <distance function class specification>
Full class name of Distance function class to use, followed
by scheme options.
(default weka.core.EuclideanDistance).</pre>
<pre> -N <file name>
file to read starting centers from (ARFF format).</pre>
<pre> -O <file name>
file to write centers to (ARFF format).</pre>
<pre> -U <int>
The debug level.
(default 0)</pre>
<pre> -Y <file name>
The debug vectors file.</pre>
<pre> -S <num>
Random number seed.
(default 10)</pre>
<!-- options-end -->
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Revision: 8109 $</DD>
<DT><B>Author:</B></DT>
<DD>Gabi Schmidberger (gabi@cs.waikato.ac.nz), Mark Hall (mhall@cs.waikato.ac.nz), Malcolm Ware (mfw4@cs.waikato.ac.nz)</DD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true"title="class or interface in java.io">Reader</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/PrintWriter.html?is-external=true"title="class or interface in java.io">PrintWriter</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true"title="class or interface in java.io">Reader</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A></CODE></FONT></TD>
<CODE>protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[]</CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Enumeration.html?is-external=true"title="class or interface in java.util">Enumeration</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#main(java.lang.String[])">main</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[] argv)</CODE>
<BR>
Main method for testing this class.</TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#makeCentersRandomly(java.util.Random, weka.core.Instances, int)">makeCentersRandomly</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Random.html?is-external=true"title="class or interface in java.util">Random</A> random0,
weka.core.Instances model,
int numClusters)</CODE>
<BR>
Generates new centers randomly.</TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#PFD_CURR(java.lang.String)">PFD_CURR</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> output)</CODE>
<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> output)</CODE>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#setDebugVectorsFile(java.io.File)">setDebugVectorsFile</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A> value)</CODE>
<BR>
Sets the file that has the random vectors stored.</TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#setInputCenterFile(java.io.File)">setInputCenterFile</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A> value)</CODE>
<BR>
Sets the file to read the list of centers from.</TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#setOptions(java.lang.String[])">setOptions</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[] options)</CODE>
<BR>
Parses a given list of options.</TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#setOutputCenterFile(java.io.File)">setOutputCenterFile</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A> value)</CODE>
<BR>
Sets file to write the list of centers to.</TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#splitCenter(java.util.Random, weka.core.Instance, double, weka.core.Instances)">splitCenter</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Random.html?is-external=true"title="class or interface in java.util">Random</A> random,
weka.core.Instance center,
double variance,
weka.core.Instances model)</CODE>
<BR>
Split centers in their region.</TD>
<TD><CODE><B><AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeans.html#splitCenters(java.util.Random, weka.core.Instances, weka.core.Instances)">splitCenters</A></B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Random.html?is-external=true"title="class or interface in java.util">Random</A> random,
weka.core.Instances instances,
weka.core.Instances model)</CODE>
<BR>
Split centers in their region.</TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<CODE> <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A></CODE></FONT></TD>
<THALIGN="left"><B>Methods inherited from class java.lang.<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TRBGCOLOR="white"CLASS="TableRowColor">
<TD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()"title="class or interface in java.lang">clone</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)"title="class or interface in java.lang">equals</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()"title="class or interface in java.lang">finalize</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()"title="class or interface in java.lang">getClass</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()"title="class or interface in java.lang">hashCode</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()"title="class or interface in java.lang">notify</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()"title="class or interface in java.lang">notifyAll</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)"title="class or interface in java.lang">wait</A>, <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)"title="class or interface in java.lang">wait</A></CODE></TD>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A><B>m_InputCenterFile</B></PRE>
<DL>
<DD>file name of the output file for the cluster centers.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="m_DebugVectorsInput"><!----></A><H3>
m_DebugVectorsInput</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true"title="class or interface in java.io">Reader</A><B>m_DebugVectorsInput</B></PRE>
<DL>
<DD>input file for the random vectors --> USED FOR DEBUGGING.
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A><B>m_DebugVectorsFile</B></PRE>
<DL>
<DD>file name of the input file for the random vectors.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="m_CenterInput"><!----></A><H3>
m_CenterInput</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/Reader.html?is-external=true"title="class or interface in java.io">Reader</A><B>m_CenterInput</B></PRE>
<DL>
<DD>input file for the cluster centers.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="m_OutputCenterFile"><!----></A><H3>
m_OutputCenterFile</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A><B>m_OutputCenterFile</B></PRE>
<DL>
<DD>file name of the output file for the cluster centers.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="m_CenterOutput"><!----></A><H3>
m_CenterOutput</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/PrintWriter.html?is-external=true"title="class or interface in java.io">PrintWriter</A><B>m_CenterOutput</B></PRE>
<DL>
<DD>output file for the cluster centers.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="m_ClusterAssignments"><!----></A><H3>
m_ClusterAssignments</H3>
<PRE>
protected int[] <B>m_ClusterAssignments</B></PRE>
<DL>
<DD>temporary variable holding cluster assignments while iterating.
<P>
<DL>
</DL>
</DL>
<HR>
<ANAME="m_CutOffFactor"><!----></A><H3>
m_CutOffFactor</H3>
<PRE>
protected double <B>m_CutOffFactor</B></PRE>
<DL>
<DD>cutoff factor - percentage of splits done in Improve-Structure part
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>globalInfo</B>()</PRE>
<DL>
<DD>Returns a string describing this clusterer.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a description of the evaluator suitable for
public weka.core.TechnicalInformation <B>getTechnicalInformation</B>()</PRE>
<DL>
<DD>Returns an instance of a TechnicalInformation object, containing
detailed information about the technical background of this class,
e.g., paper reference or book this class is based on.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getTechnicalInformation</CODE> in interface <CODE>weka.core.TechnicalInformationHandler</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the technical information about this class</DL>
</DD>
</DL>
<HR>
<ANAME="getCapabilities()"><!----></A><H3>
getCapabilities</H3>
<PRE>
public weka.core.Capabilities <B>getCapabilities</B>()</PRE>
<DL>
<DD>Returns default capabilities of the clusterer.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getCapabilities</CODE> in interface <CODE>weka.clusterers.Clusterer</CODE><DT><B>Specified by:</B><DD><CODE>getCapabilities</CODE> in interface <CODE>weka.core.CapabilitiesHandler</CODE><DT><B>Overrides:</B><DD><CODE>getCapabilities</CODE> in class <CODE>weka.clusterers.AbstractClusterer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the capabilities of this clusterer</DL>
public void <B>buildClusterer</B>(weka.core.Instances data)
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Generates the X-Means clusterer.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>buildClusterer</CODE> in interface <CODE>weka.clusterers.Clusterer</CODE><DT><B>Specified by:</B><DD><CODE>buildClusterer</CODE> in class <CODE>weka.clusterers.AbstractClusterer</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><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if the clusterer has not been
The following steps 1. and 2. both take care that the number of centers
does not exceed maxCenters.
1. Compare BIC values of parent and children and takes the one as
new centers which do win (= BIC-value is smaller).
2. If in 1. none of the children are chosen
&& and cutoff factor is > 0
cutoff factor is taken as the percentage of "best" centers that are
still taken.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pbic</CODE> - array of parents BIC-values<DD><CODE>cbic</CODE> - array of childrens BIC-values<DD><CODE>cutoffFactor</CODE> - cutoff factor<DD><CODE>splitCenters</CODE> - all children
<DD>Returns new centers. Depending on splitWon: if true takes children, if
false takes parent = current center.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>splitWon</CODE> - array of boolean to indicate to take split or not<DD><CODE>splitCenters</CODE> - list of splitted centers
<DD>Recompute the new centers. New cluster center is center of mass of its
instances. Returns true if cluster stays the same.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>centers</CODE> - the input and output centers<DD><CODE>instOfCent</CODE> - the instances to the centers<DD><CODE>model</CODE> - data model information
Same as recomputeCenters, but does not check if center stays the same.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>centers</CODE> - the input center and output centers<DD><CODE>instOfCentIndexes</CODE> - the indexes of the instances to the centers<DD><CODE>model</CODE> - data model information</DL>
<DD>Computes Mean Or Mode of one attribute on a subset of m_Instances.
The subset is defined by an index list.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instances</CODE> - all instances<DD><CODE>instList</CODE> - the indexes of the instances the mean is computed from<DD><CODE>attIndex</CODE> - the index of the attribute
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Assigns instances to centers.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>tree</CODE> - KDTree on all instances<DD><CODE>centers</CODE> - all the input centers<DD><CODE>instOfCent</CODE> - the instances to each center<DD><CODE>allInstList</CODE> - list of all instances<DD><CODE>assignments</CODE> - assignments of instances to centers<DD><CODE>iterationCount</CODE> - the number of iteration
<DT><B>Returns:</B><DD>true if converged
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - is something goes wrong</DL>
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Assign instances to centers using KDtree.
First part of conventionell K-Means, returns true if new assignment
is the same as the last one.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>kdtree</CODE> - KDTree on all instances<DD><CODE>centers</CODE> - all the input centers<DD><CODE>instOfCent</CODE> - the instances to each center<DD><CODE>assignments</CODE> - assignments of instances to centers<DD><CODE>iterationCount</CODE> - the number of iteration
<DT><B>Returns:</B><DD>true if converged
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - in case instances are not assigned to cluster</DL>
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Assign instances to centers.
Part of conventionell K-Means, returns true if new assignment
is the same as the last one.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>centers</CODE> - all the input centers<DD><CODE>instOfCent</CODE> - the instances to each center<DD><CODE>allInstList</CODE> - list of all indexes<DD><CODE>assignments</CODE> - assignments of instances to centers
<DT><B>Returns:</B><DD>true if converged
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if something goes wrong</DL>
protected int <B>nextAssignedOne</B>(int cent,
int lastIndex,
int[] assignments)</PRE>
<DL>
<DD>Searches along the assignment array for the next entry of the center
in question.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>cent</CODE> - index of the center<DD><CODE>lastIndex</CODE> - index to start searching<DD><CODE>assignments</CODE> - assignments
<DT><B>Returns:</B><DD>index of the instance the center cent is assigned to</DL>
protected weka.core.Instances <B>splitCenter</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Random.html?is-external=true"title="class or interface in java.util">Random</A> random,
weka.core.Instance center,
double variance,
weka.core.Instances model)
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Split centers in their region. Generates random vector of
length = variance and
adds and substractsx to cluster vector to get two new clusters.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>random</CODE> - random function<DD><CODE>center</CODE> - the center that is split here<DD><CODE>variance</CODE> - variance of the cluster<DD><CODE>model</CODE> - data model valid
<DT><B>Returns:</B><DD>a pair of new centers
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - something in AlgVector goes wrong</DL>
protected weka.core.Instances <B>splitCenters</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Random.html?is-external=true"title="class or interface in java.util">Random</A> random,
weka.core.Instances instances,
weka.core.Instances model)</PRE>
<DL>
<DD>Split centers in their region.
(*Alternative version of splitCenter()*)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>random</CODE> - the random number generator<DD><CODE>instances</CODE> - of the region<DD><CODE>model</CODE> - the model for the centers
protected weka.core.Instances <B>makeCentersRandomly</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Random.html?is-external=true"title="class or interface in java.util">Random</A> random0,
weka.core.Instances model,
int numClusters)</PRE>
<DL>
<DD>Generates new centers randomly. Used for starting centers.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>random0</CODE> - random number generator<DD><CODE>model</CODE> - data model of the instances<DD><CODE>numClusters</CODE> - number of clusters
<DD>Returns the BIC-value for the given center and instances.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instList</CODE> - The indices of the instances that belong to the center<DD><CODE>center</CODE> - the center.<DD><CODE>mle</CODE> - maximum likelihood<DD><CODE>model</CODE> - the data model
<DD>Calculates the BIC for the given set of centers and instances.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instOfCent</CODE> - The instances that belong to their respective centers<DD><CODE>centers</CODE> - the centers<DD><CODE>mle</CODE> - maximum likelihood
<DT><B>Returns:</B><DD>The BIC for the input.</DL>
<DD>Calculates the log-likelihood of the data for the given model, taken
at the maximum likelihood point.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>numInst</CODE> - number of instances that belong to the center<DD><CODE>center</CODE> - the center<DD><CODE>distortion</CODE> - distortion<DD><CODE>numCent</CODE> - number of centers
protected int <B>clusterProcessedInstance</B>(weka.core.Instance instance,
weka.core.Instances centers)</PRE>
<DL>
<DD>Clusters an instance.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance to assign a cluster to.<DD><CODE>centers</CODE> - the centers to cluster the instance to.
public int <B>clusterInstance</B>(weka.core.Instance instance)
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Classifies a given instance.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>clusterInstance</CODE> in interface <CODE>weka.clusterers.Clusterer</CODE><DT><B>Overrides:</B><DD><CODE>clusterInstance</CODE> in class <CODE>weka.clusterers.AbstractClusterer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instance</CODE> - the instance to be assigned to a cluster
<DT><B>Returns:</B><DD>the number of the assigned cluster as an integer
if the class is enumerated, otherwise the predicted value
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if instance could not be classified
successfully</DL>
</DD>
</DL>
<HR>
<ANAME="numberOfClusters()"><!----></A><H3>
numberOfClusters</H3>
<PRE>
public int <B>numberOfClusters</B>()</PRE>
<DL>
<DD>Returns the number of clusters.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>numberOfClusters</CODE> in interface <CODE>weka.clusterers.Clusterer</CODE><DT><B>Specified by:</B><DD><CODE>numberOfClusters</CODE> in class <CODE>weka.clusterers.AbstractClusterer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of clusters generated for a training dataset.</DL>
</DD>
</DL>
<HR>
<ANAME="listOptions()"><!----></A><H3>
listOptions</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/util/Enumeration.html?is-external=true"title="class or interface in java.util">Enumeration</A><B>listOptions</B>()</PRE>
<DL>
<DD>Returns an enumeration describing the available options.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>listOptions</CODE> in interface <CODE>weka.core.OptionHandler</CODE><DT><B>Overrides:</B><DD><CODE>listOptions</CODE> in class <CODE>weka.clusterers.RandomizableClusterer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an enumeration of all the available options</DL>
</DD>
</DL>
<HR>
<ANAME="minNumClustersTipText()"><!----></A><H3>
minNumClustersTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>minNumClustersTipText</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</DL>
</DD>
</DL>
<HR>
<ANAME="setMinNumClusters(int)"><!----></A><H3>
setMinNumClusters</H3>
<PRE>
public void <B>setMinNumClusters</B>(int n)</PRE>
<DL>
<DD>Sets the minimum number of clusters to generate.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the minimum number of clusters to generate</DL>
</DD>
</DL>
<HR>
<ANAME="getMinNumClusters()"><!----></A><H3>
getMinNumClusters</H3>
<PRE>
public int <B>getMinNumClusters</B>()</PRE>
<DL>
<DD>Gets the minimum number of clusters to generate.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the minimum number of clusters to generate</DL>
</DD>
</DL>
<HR>
<ANAME="maxNumClustersTipText()"><!----></A><H3>
maxNumClustersTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>maxNumClustersTipText</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</DL>
</DD>
</DL>
<HR>
<ANAME="setMaxNumClusters(int)"><!----></A><H3>
setMaxNumClusters</H3>
<PRE>
public void <B>setMaxNumClusters</B>(int n)</PRE>
<DL>
<DD>Sets the maximum number of clusters to generate.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>n</CODE> - the maximum number of clusters to generate</DL>
</DD>
</DL>
<HR>
<ANAME="getMaxNumClusters()"><!----></A><H3>
getMaxNumClusters</H3>
<PRE>
public int <B>getMaxNumClusters</B>()</PRE>
<DL>
<DD>Gets the maximum number of clusters to generate.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the maximum number of clusters to generate</DL>
</DD>
</DL>
<HR>
<ANAME="maxIterationsTipText()"><!----></A><H3>
maxIterationsTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>maxIterationsTipText</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</DL>
</DD>
</DL>
<HR>
<ANAME="setMaxIterations(int)"><!----></A><H3>
setMaxIterations</H3>
<PRE>
public void <B>setMaxIterations</B>(int i)
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Sets the maximum number of iterations to perform.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the number of iterations
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if i is less than 1</DL>
</DD>
</DL>
<HR>
<ANAME="getMaxIterations()"><!----></A><H3>
getMaxIterations</H3>
<PRE>
public int <B>getMaxIterations</B>()</PRE>
<DL>
<DD>Gets the maximum number of iterations.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of iterations</DL>
</DD>
</DL>
<HR>
<ANAME="maxKMeansTipText()"><!----></A><H3>
maxKMeansTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>maxKMeansTipText</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</DL>
</DD>
</DL>
<HR>
<ANAME="setMaxKMeans(int)"><!----></A><H3>
setMaxKMeans</H3>
<PRE>
public void <B>setMaxKMeans</B>(int i)</PRE>
<DL>
<DD>Set the maximum number of iterations to perform in KMeans.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the number of iterations</DL>
</DD>
</DL>
<HR>
<ANAME="getMaxKMeans()"><!----></A><H3>
getMaxKMeans</H3>
<PRE>
public int <B>getMaxKMeans</B>()</PRE>
<DL>
<DD>Gets the maximum number of iterations in KMeans.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of iterations</DL>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>maxKMeansForChildrenTipText</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</DL>
<DD>Gets the maximum number of iterations in KMeans.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the number of iterations</DL>
</DD>
</DL>
<HR>
<ANAME="cutOffFactorTipText()"><!----></A><H3>
cutOffFactorTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>cutOffFactorTipText</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</DL>
</DD>
</DL>
<HR>
<ANAME="setCutOffFactor(double)"><!----></A><H3>
setCutOffFactor</H3>
<PRE>
public void <B>setCutOffFactor</B>(double i)</PRE>
<DL>
<DD>Sets a new cutoff factor.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>i</CODE> - the new cutoff factor</DL>
</DD>
</DL>
<HR>
<ANAME="getCutOffFactor()"><!----></A><H3>
getCutOffFactor</H3>
<PRE>
public double <B>getCutOffFactor</B>()</PRE>
<DL>
<DD>Gets the cutoff factor.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the cutoff factor</DL>
</DD>
</DL>
<HR>
<ANAME="binValueTipText()"><!----></A><H3>
binValueTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>binValueTipText</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>
<ANAME="getBinValue()"><!----></A><H3>
getBinValue</H3>
<PRE>
public double <B>getBinValue</B>()</PRE>
<DL>
<DD>Gets value that represents true in a new numeric attribute.
(False is always represented by 0.0.)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the value that represents true in a new numeric attribute</DL>
</DD>
</DL>
<HR>
<ANAME="setBinValue(double)"><!----></A><H3>
setBinValue</H3>
<PRE>
public void <B>setBinValue</B>(double value)</PRE>
<DL>
<DD>Sets the distance value between true and false of binary attributes.
and "same" and "different" of nominal attributes
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the distance</DL>
</DD>
</DL>
<HR>
<ANAME="distanceFTipText()"><!----></A><H3>
distanceFTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>distanceFTipText</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
public void <B>setDistanceF</B>(weka.core.DistanceFunction distanceF)</PRE>
<DL>
<DD>gets the "binary" distance value.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>distanceF</CODE> - the distance function with all options set</DL>
</DD>
</DL>
<HR>
<ANAME="getDistanceF()"><!----></A><H3>
getDistanceF</H3>
<PRE>
public weka.core.DistanceFunction <B>getDistanceF</B>()</PRE>
<DL>
<DD>Gets the distance function.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the distance function</DL>
</DD>
</DL>
<HR>
<ANAME="getDistanceFSpec()"><!----></A><H3>
getDistanceFSpec</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>getDistanceFSpec</B>()</PRE>
<DL>
<DD>Gets the distance function specification string, which contains the
class name of the distance function class and any options to it.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the distance function specification string</DL>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>debugVectorsFileTipText</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
public void <B>setDebugVectorsFile</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A> value)</PRE>
<DL>
<DD>Sets the file that has the random vectors stored.
Only used for debugging reasons.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the file to read the random vectors from</DL>
</DD>
</DL>
<HR>
<ANAME="getDebugVectorsFile()"><!----></A><H3>
getDebugVectorsFile</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A><B>getDebugVectorsFile</B>()</PRE>
<DL>
<DD>Gets the file name for a file that has the random vectors stored.
Only used for debugging purposes.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the file to read the vectors from</DL>
</DD>
</DL>
<HR>
<ANAME="initDebugVectorsInput()"><!----></A><H3>
initDebugVectorsInput</H3>
<PRE>
public void <B>initDebugVectorsInput</B>()
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Initialises the debug vector input.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if there is error
public weka.core.Instance <B>getNextDebugVectorsInstance</B>(weka.core.Instances model)
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Read an instance from debug vectors file.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>model</CODE> - the data model for the instance.
<DT><B>Returns:</B><DD>the next debug vector.
<DT><B>Throws:</B>
<DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if there are no debug vector
in m_DebugVectors.</DL>
</DD>
</DL>
<HR>
<ANAME="inputCenterFileTipText()"><!----></A><H3>
inputCenterFileTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>inputCenterFileTipText</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
public void <B>setInputCenterFile</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A> value)</PRE>
<DL>
<DD>Sets the file to read the list of centers from.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - the file to read centers from</DL>
</DD>
</DL>
<HR>
<ANAME="getInputCenterFile()"><!----></A><H3>
getInputCenterFile</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A><B>getInputCenterFile</B>()</PRE>
<DL>
<DD>Gets the file to read the list of centers from.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the file to read the centers from</DL>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>outputCenterFileTipText</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
public void <B>setOutputCenterFile</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A> value)</PRE>
<DL>
<DD>Sets file to write the list of centers to.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - file to write centers to</DL>
</DD>
</DL>
<HR>
<ANAME="getOutputCenterFile()"><!----></A><H3>
getOutputCenterFile</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/io/File.html?is-external=true"title="class or interface in java.io">File</A><B>getOutputCenterFile</B>()</PRE>
<DL>
<DD>Gets the file to write the list of centers to.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>filename of the file to write centers to</DL>
</DD>
</DL>
<HR>
<ANAME="KDTreeTipText()"><!----></A><H3>
KDTreeTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>KDTreeTipText</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
public void <B>setKDTree</B>(weka.core.neighboursearch.KDTree k)</PRE>
<DL>
<DD>Sets the KDTree class.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>k</CODE> - a KDTree object with all options set</DL>
</DD>
</DL>
<HR>
<ANAME="getKDTree()"><!----></A><H3>
getKDTree</H3>
<PRE>
public weka.core.neighboursearch.KDTree <B>getKDTree</B>()</PRE>
<DL>
<DD>Gets the KDTree class.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the configured KDTree</DL>
</DD>
</DL>
<HR>
<ANAME="useKDTreeTipText()"><!----></A><H3>
useKDTreeTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>useKDTreeTipText</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>
<ANAME="setUseKDTree(boolean)"><!----></A><H3>
setUseKDTree</H3>
<PRE>
public void <B>setUseKDTree</B>(boolean value)</PRE>
<DL>
<DD>Sets whether to use the KDTree or not.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>value</CODE> - if true the KDTree is used</DL>
</DD>
</DL>
<HR>
<ANAME="getUseKDTree()"><!----></A><H3>
getUseKDTree</H3>
<PRE>
public boolean <B>getUseKDTree</B>()</PRE>
<DL>
<DD>Gets whether the KDTree is used or not.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>true if KDTrees are used</DL>
</DD>
</DL>
<HR>
<ANAME="getKDTreeSpec()"><!----></A><H3>
getKDTreeSpec</H3>
<PRE>
protected <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>getKDTreeSpec</B>()</PRE>
<DL>
<DD>Gets the KDTree specification string, which contains the class name of
the KDTree class and any options to the KDTree.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the KDTree string.</DL>
</DD>
</DL>
<HR>
<ANAME="debugLevelTipText()"><!----></A><H3>
debugLevelTipText</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>debugLevelTipText</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>
<ANAME="setDebugLevel(int)"><!----></A><H3>
setDebugLevel</H3>
<PRE>
public void <B>setDebugLevel</B>(int d)</PRE>
public void <B>setOptions</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[] options)
throws <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></PRE>
<DL>
<DD>Parses a given list of options. <p/>
<!-- options-start -->
Valid options are: <p/>
<pre> -I <num>
maximum number of overall iterations
(default 1).</pre>
<pre> -M <num>
maximum number of iterations in the kMeans loop in
the Improve-Parameter part
(default 1000).</pre>
<pre> -J <num>
maximum number of iterations in the kMeans loop
for the splitted centroids in the Improve-Structure part
(default 1000).</pre>
<pre> -L <num>
minimum number of clusters
(default 2).</pre>
<pre> -H <num>
maximum number of clusters
(default 4).</pre>
<pre> -B <value>
distance value for binary attributes
(default 1.0).</pre>
<pre> -use-kdtree
Uses the KDTree internally
(default no).</pre>
<pre> -K <KDTree class specification>
Full class name of KDTree class to use, followed
by scheme options.
eg: "weka.core.neighboursearch.kdtrees.KDTree -P"
(default no KDTree class used).</pre>
<pre> -C <value>
cutoff factor, takes the given percentage of the splitted
centroids if none of the children win
(default 0.0).</pre>
<pre> -D <distance function class specification>
Full class name of Distance function class to use, followed
by scheme options.
(default weka.core.EuclideanDistance).</pre>
<pre> -N <file name>
file to read starting centers from (ARFF format).</pre>
<pre> -O <file name>
file to write centers to (ARFF format).</pre>
<pre> -U <int>
The debug level.
(default 0)</pre>
<pre> -Y <file name>
The debug vectors file.</pre>
<pre> -S <num>
Random number seed.
(default 10)</pre>
<!-- options-end -->
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>setOptions</CODE> in interface <CODE>weka.core.OptionHandler</CODE><DT><B>Overrides:</B><DD><CODE>setOptions</CODE> in class <CODE>weka.clusterers.RandomizableClusterer</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><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Exception.html?is-external=true"title="class or interface in java.lang">Exception</A></CODE> - if an option is not supported</DL>
</DD>
</DL>
<HR>
<ANAME="getOptions()"><!----></A><H3>
getOptions</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[] <B>getOptions</B>()</PRE>
<DL>
<DD>Gets the current settings of SimpleKMeans.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getOptions</CODE> in interface <CODE>weka.core.OptionHandler</CODE><DT><B>Overrides:</B><DD><CODE>getOptions</CODE> in class <CODE>weka.clusterers.RandomizableClusterer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>an array of strings suitable for passing to setOptions</DL>
</DD>
</DL>
<HR>
<ANAME="toString()"><!----></A><H3>
toString</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>toString</B>()</PRE>
<DL>
<DD>Return a string describing this clusterer.
<P>
<DD><DL>
<DT><B>Overrides:</B><DD><CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()"title="class or interface in java.lang">toString</A></CODE> in class <CODE><AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true"title="class or interface in java.lang">Object</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>a description of the clusterer as a string</DL>
</DD>
</DL>
<HR>
<ANAME="getClusterCenters()"><!----></A><H3>
getClusterCenters</H3>
<PRE>
public weka.core.Instances <B>getClusterCenters</B>()</PRE>
<DL>
<DD>Return the centers of the clusters as an Instances object
<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> output)</PRE>
<DL>
<DD>Does debug printouts.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>debugLevel</CODE> - level that gives according messages<DD><CODE>output</CODE> - string that is printed</DL>
protected void <B>PFD_CURR</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A> output)</PRE>
<DL>
<DD>Does debug printouts.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>output</CODE> - string that is printed</DL>
</DD>
</DL>
<HR>
<ANAME="getRevision()"><!----></A><H3>
getRevision</H3>
<PRE>
public <AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A><B>getRevision</B>()</PRE>
<DL>
<DD>Returns the revision string.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE>getRevision</CODE> in interface <CODE>weka.core.RevisionHandler</CODE><DT><B>Overrides:</B><DD><CODE>getRevision</CODE> in class <CODE>weka.clusterers.AbstractClusterer</CODE></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the revision</DL>
</DD>
</DL>
<HR>
<ANAME="main(java.lang.String[])"><!----></A><H3>
main</H3>
<PRE>
public static void <B>main</B>(<AHREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true"title="class or interface in java.lang">String</A>[] 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> - should contain options</DL>
<AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/KMeans.html"title="class in org.gcube.dataanalysis.ecoengine.clustering"><B>PREV CLASS</B></A>
<AHREF="../../../../../org/gcube/dataanalysis/ecoengine/clustering/XMeansWrapper.html"title="class in org.gcube.dataanalysis.ecoengine.clustering"><B>NEXT CLASS</B></A></FONT></TD>