blob: a0c9430fe24eee0be2ba5fd6614c15cfdade6f94 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Fri Apr 14 22:11:35 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>StreamingKMeans (Mahout Map-Reduce 0.13.0 API)</title>
<meta name="date" content="2017-04-14">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StreamingKMeans (Mahout Map-Reduce 0.13.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StreamingKMeans.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/BallKMeans.html" title="class in org.apache.mahout.clustering.streaming.cluster"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html" target="_top">Frames</a></li>
<li><a href="StreamingKMeans.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.mahout.clustering.streaming.cluster</div>
<h2 title="Class StreamingKMeans" class="title">Class StreamingKMeans</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li>org.apache.mahout.clustering.streaming.cluster.StreamingKMeans</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">StreamingKMeans</span>
extends <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a>
implements <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;</pre>
<div class="block">Implements a streaming k-means algorithm for weighted vectors.
The goal clustering points one at a time, especially useful for MapReduce mappers that get inputs one at a time.
A rough description of the algorithm:
Suppose there are l clusters at one point and a new point p is added.
The new point can either be added to one of the existing l clusters or become a new cluster. To decide:
- let c be the closest cluster to point p;
- let d be the distance between c and p;
- if d > distanceCutoff, create a new cluster from p (p is too far away from the clusters to be part of them;
distanceCutoff represents the largest distance from a point its assigned cluster's centroid);
- else (d <= distanceCutoff), create a new cluster with probability d / distanceCutoff (the probability of creating
a new cluster increases as d increases).
There will be either l points or l + 1 points after processing a new point.
As the number of clusters increases, it will go over the numClusters limit (numClusters represents a recommendation
for the number of clusters that there should be at the end). To decrease the number of clusters the existing clusters
are treated as data points and are re-clustered (collapsed). This tends to make the number of clusters go down.
If the number of clusters is still too high, distanceCutoff is increased.
For more details, see:
- "Streaming k-means approximation" by N. Ailon, R. Jaiswal, C. Monteleoni
http://books.nips.cc/papers/files/nips22/NIPS2009_1085.pdf
- "Fast and Accurate k-means for Large Datasets" by M. Shindler, A. Wong, A. Meyerson,
http://books.nips.cc/papers/files/nips24/NIPS2011_1271.pdf</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-">StreamingKMeans</a></span>(<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;searcher,
int&nbsp;numClusters)</code>
<div class="block">Calls StreamingKMeans(searcher, numClusters, 1.3, 10, 2).</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-double-">StreamingKMeans</a></span>(<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;searcher,
int&nbsp;numClusters,
double&nbsp;distanceCutoff)</code>
<div class="block">Calls StreamingKMeans(searcher, numClusters, distanceCutoff, 1.3, 10, 2).</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-double-double-double-double-">StreamingKMeans</a></span>(<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;searcher,
int&nbsp;numClusters,
double&nbsp;distanceCutoff,
double&nbsp;beta,
double&nbsp;clusterLogFactor,
double&nbsp;clusterOvershoot)</code>
<div class="block">Creates a new StreamingKMeans class given a searcher and the number of clusters to generate.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#cluster-org.apache.mahout.math.Centroid-">cluster</a></span>(<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&nbsp;datapoint)</code>
<div class="block">Cluster one data point.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#cluster-java.lang.Iterable-">cluster</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;&nbsp;datapoints)</code>
<div class="block">Cluster the data points in an Iterable<Centroid>.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#cluster-org.apache.mahout.math.Matrix-">cluster</a></span>(<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Matrix.html?is-external=true" title="class or interface in org.apache.mahout.math">Matrix</a>&nbsp;data)</code>
<div class="block">Cluster the rows of a matrix, treating them as Centroids with weight 1.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#getDistanceCutoff--">getDistanceCutoff</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#getDistanceMeasure--">getDistanceMeasure</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#getNumClusters--">getNumClusters</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#iterator--">iterator</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#reindexCentroids--">reindexCentroids</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#setDistanceCutoff-double-">setDistanceCutoff</a></span>(double&nbsp;distanceCutoff)</code>&nbsp;</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Iterable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true#forEach-java.util.function.Consumer-" title="class or interface in java.lang">forEach</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true#spliterator--" title="class or interface in java.lang">spliterator</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>StreamingKMeans</h4>
<pre>public&nbsp;StreamingKMeans(<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;searcher,
int&nbsp;numClusters)</pre>
<div class="block">Calls StreamingKMeans(searcher, numClusters, 1.3, 10, 2).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-double-double-double-double-"><code>StreamingKMeans(org.apache.mahout.math.neighborhood.UpdatableSearcher, int,
double, double, double, double)</code></a></dd>
</dl>
</li>
</ul>
<a name="StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>StreamingKMeans</h4>
<pre>public&nbsp;StreamingKMeans(<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;searcher,
int&nbsp;numClusters,
double&nbsp;distanceCutoff)</pre>
<div class="block">Calls StreamingKMeans(searcher, numClusters, distanceCutoff, 1.3, 10, 2).</div>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-double-double-double-double-"><code>StreamingKMeans(org.apache.mahout.math.neighborhood.UpdatableSearcher, int,
double, double, double, double)</code></a></dd>
</dl>
</li>
</ul>
<a name="StreamingKMeans-org.apache.mahout.math.neighborhood.UpdatableSearcher-int-double-double-double-double-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>StreamingKMeans</h4>
<pre>public&nbsp;StreamingKMeans(<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;searcher,
int&nbsp;numClusters,
double&nbsp;distanceCutoff,
double&nbsp;beta,
double&nbsp;clusterLogFactor,
double&nbsp;clusterOvershoot)</pre>
<div class="block">Creates a new StreamingKMeans class given a searcher and the number of clusters to generate.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>searcher</code> - A Searcher that is used for performing nearest neighbor search. It MUST BE
EMPTY initially because it will be used to keep track of the cluster
centroids.</dd>
<dd><code>numClusters</code> - An estimated number of clusters to generate for the data points.
This can adjusted, but the actual number will depend on the data. The</dd>
<dd><code>distanceCutoff</code> - The initial distance cutoff representing the value of the
distance between a point and its closest centroid after which
the new point will definitely be assigned to a new cluster.</dd>
<dd><code>beta</code> - Ratio of geometric progression to use when increasing distanceCutoff. After n increases, distanceCutoff
becomes distanceCutoff * beta^n. A smaller value increases the distanceCutoff less aggressively.</dd>
<dd><code>clusterLogFactor</code> - Value multiplied with the number of points counted so far estimating the number of clusters
to aim for. If the final number of clusters is known and this clustering is only for a
sketch of the data, this can be the final number of clusters, k.</dd>
<dd><code>clusterOvershoot</code> - Multiplicative slack factor for slowing down the collapse of the clusters.</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="iterator--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>iterator</h4>
<pre>public&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/Iterator.html?is-external=true" title="class or interface in java.util">Iterator</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;&nbsp;iterator()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Specified by:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true#iterator--" title="class or interface in java.lang">iterator</a></code>&nbsp;in interface&nbsp;<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;</code></dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an Iterator to the Centroids contained in this clusterer.</dd>
</dl>
</li>
</ul>
<a name="cluster-org.apache.mahout.math.Matrix-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cluster</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;cluster(<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Matrix.html?is-external=true" title="class or interface in org.apache.mahout.math">Matrix</a>&nbsp;data)</pre>
<div class="block">Cluster the rows of a matrix, treating them as Centroids with weight 1.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - matrix whose rows are to be clustered.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the UpdatableSearcher containing the resulting centroids.</dd>
</dl>
</li>
</ul>
<a name="cluster-java.lang.Iterable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cluster</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;cluster(<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Iterable.html?is-external=true" title="class or interface in java.lang">Iterable</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&gt;&nbsp;datapoints)</pre>
<div class="block">Cluster the data points in an Iterable<Centroid>.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>datapoints</code> - Iterable whose elements are to be clustered.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the UpdatableSearcher containing the resulting centroids.</dd>
</dl>
</li>
</ul>
<a name="cluster-org.apache.mahout.math.Centroid-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>cluster</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/mahout/math/neighborhood/UpdatableSearcher.html" title="class in org.apache.mahout.math.neighborhood">UpdatableSearcher</a>&nbsp;cluster(<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Centroid.html?is-external=true" title="class or interface in org.apache.mahout.math">Centroid</a>&nbsp;datapoint)</pre>
<div class="block">Cluster one data point.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>datapoint</code> - to be clustered.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the UpdatableSearcher containing the resulting centroids.</dd>
</dl>
</li>
</ul>
<a name="getNumClusters--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumClusters</h4>
<pre>public&nbsp;int&nbsp;getNumClusters()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the number of clusters computed from the points until now.</dd>
</dl>
</li>
</ul>
<a name="reindexCentroids--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>reindexCentroids</h4>
<pre>public&nbsp;void&nbsp;reindexCentroids()</pre>
</li>
</ul>
<a name="getDistanceCutoff--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getDistanceCutoff</h4>
<pre>public&nbsp;double&nbsp;getDistanceCutoff()</pre>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the distanceCutoff (an upper bound for the maximum distance within a cluster).</dd>
</dl>
</li>
</ul>
<a name="setDistanceCutoff-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setDistanceCutoff</h4>
<pre>public&nbsp;void&nbsp;setDistanceCutoff(double&nbsp;distanceCutoff)</pre>
</li>
</ul>
<a name="getDistanceMeasure--">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>getDistanceMeasure</h4>
<pre>public&nbsp;<a href="../../../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;getDistanceMeasure()</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/StreamingKMeans.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/mahout/clustering/streaming/cluster/BallKMeans.html" title="class in org.apache.mahout.clustering.streaming.cluster"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html" target="_top">Frames</a></li>
<li><a href="StreamingKMeans.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>