blob: 1cc8dfacd9ed073812f02d787c58c4aaf46fed8a [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:34 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>ClusteringUtils (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="ClusteringUtils (Mahout Map-Reduce 0.13.0 API)";
}
}
catch(err) {
}
//-->
var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9};
var tabs = {65535:["t0","All Methods"],1:["t1","Static 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/ClusteringUtils.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/Cluster.html" title="interface in org.apache.mahout.clustering"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/mahout/clustering/GaussianAccumulator.html" title="interface in org.apache.mahout.clustering"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/mahout/clustering/ClusteringUtils.html" target="_top">Frames</a></li>
<li><a href="ClusteringUtils.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>Constr&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>Constr&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</div>
<h2 title="Class ClusteringUtils" class="title">Class ClusteringUtils</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.ClusteringUtils</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public final class <span class="typeNameLabel">ClusteringUtils</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></pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== 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="t1" class="tableTab"><span><a href="javascript:show(1);">Static 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>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#choose2-double-">choose2</a></span>(double&nbsp;n)</code>&nbsp;</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#daviesBouldinIndex-java.util.List-org.apache.mahout.common.distance.DistanceMeasure-java.util.List-">daviesBouldinIndex</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/stats/OnlineSummarizer.html?is-external=true" title="class or interface in org.apache.mahout.math.stats">OnlineSummarizer</a>&gt;&nbsp;clusterDistanceSummaries)</code>
<div class="block">Computes the Davies-Bouldin Index for a given clustering.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#dunnIndex-java.util.List-org.apache.mahout.common.distance.DistanceMeasure-java.util.List-">dunnIndex</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/stats/OnlineSummarizer.html?is-external=true" title="class or interface in org.apache.mahout.math.stats">OnlineSummarizer</a>&gt;&nbsp;clusterDistanceSummaries)</code>
<div class="block">Computes the Dunn Index of a given clustering.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static &lt;T extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;<br>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#estimateDistanceCutoff-java.lang.Iterable-org.apache.mahout.common.distance.DistanceMeasure-int-">estimateDistanceCutoff</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;T&gt;&nbsp;data,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure,
int&nbsp;sampleLimit)</code>&nbsp;</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#estimateDistanceCutoff-java.util.List-org.apache.mahout.common.distance.DistanceMeasure-">estimateDistanceCutoff</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;data,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure)</code>
<div class="block">Estimates the distance cutoff.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#getAdjustedRandIndex-org.apache.mahout.math.Matrix-">getAdjustedRandIndex</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;confusionMatrix)</code>
<div class="block">Computes the Adjusted Rand Index for a given confusion matrix.</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>static <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></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#getConfusionMatrix-java.util.List-java.util.List-java.lang.Iterable-org.apache.mahout.common.distance.DistanceMeasure-">getConfusionMatrix</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;rowCentroids,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;columnCentroids,
<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure)</code>
<div class="block">Creates a confusion matrix by searching for the closest cluster of both the row clustering and column clustering
of a point and adding its weight to that cell of the matrix.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>static <a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/stats/OnlineSummarizer.html?is-external=true" title="class or interface in org.apache.mahout.math.stats">OnlineSummarizer</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#summarizeClusterDistances-java.lang.Iterable-java.lang.Iterable-org.apache.mahout.common.distance.DistanceMeasure-">summarizeClusterDistances</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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure)</code>
<div class="block">Computes the summaries for the distances in each cluster.</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#totalClusterCost-java.lang.Iterable-java.lang.Iterable-">totalClusterCost</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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids)</code>
<div class="block">Adds up the distances from each point to its closest cluster and returns the sum.</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#totalClusterCost-java.lang.Iterable-org.apache.mahout.math.neighborhood.Searcher-">totalClusterCost</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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<a href="../../../../org/apache/mahout/math/neighborhood/Searcher.html" title="class in org.apache.mahout.math.neighborhood">Searcher</a>&nbsp;centroids)</code>
<div class="block">Adds up the distances from each point to its closest cluster and returns the sum.</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code>static double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/apache/mahout/clustering/ClusteringUtils.html#totalWeight-java.lang.Iterable-">totalWeight</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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;data)</code>
<div class="block">Computes the total weight of the points in the given Vector iterable.</div>
</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>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="summarizeClusterDistances-java.lang.Iterable-java.lang.Iterable-org.apache.mahout.common.distance.DistanceMeasure-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>summarizeClusterDistances</h4>
<pre>public static&nbsp;<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/stats/OnlineSummarizer.html?is-external=true" title="class or interface in org.apache.mahout.math.stats">OnlineSummarizer</a>&gt;&nbsp;summarizeClusterDistances(<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure)</pre>
<div class="block">Computes the summaries for the distances in each cluster.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>datapoints</code> - iterable of datapoints.</dd>
<dd><code>centroids</code> - iterable of Centroids.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a list of OnlineSummarizers where the i-th element is the summarizer corresponding to the cluster whose
index is i.</dd>
</dl>
</li>
</ul>
<a name="totalClusterCost-java.lang.Iterable-java.lang.Iterable-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>totalClusterCost</h4>
<pre>public static&nbsp;double&nbsp;totalClusterCost(<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids)</pre>
<div class="block">Adds up the distances from each point to its closest cluster and returns the sum.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>datapoints</code> - iterable of datapoints.</dd>
<dd><code>centroids</code> - iterable of Centroids.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total cost described above.</dd>
</dl>
</li>
</ul>
<a name="totalClusterCost-java.lang.Iterable-org.apache.mahout.math.neighborhood.Searcher-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>totalClusterCost</h4>
<pre>public static&nbsp;double&nbsp;totalClusterCost(<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<a href="../../../../org/apache/mahout/math/neighborhood/Searcher.html" title="class in org.apache.mahout.math.neighborhood">Searcher</a>&nbsp;centroids)</pre>
<div class="block">Adds up the distances from each point to its closest cluster and returns the sum.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>datapoints</code> - iterable of datapoints.</dd>
<dd><code>centroids</code> - searcher of Centroids.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the total cost described above.</dd>
</dl>
</li>
</ul>
<a name="estimateDistanceCutoff-java.util.List-org.apache.mahout.common.distance.DistanceMeasure-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>estimateDistanceCutoff</h4>
<pre>public static&nbsp;double&nbsp;estimateDistanceCutoff(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;data,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure)</pre>
<div class="block">Estimates the distance cutoff. In StreamingKMeans, the distance between two vectors divided
by this value is used as a probability threshold when deciding whether to form a new cluster
or not.
Small values (comparable to the minimum distance between two points) are preferred as they
guarantee with high likelihood that all but very close points are put in separate clusters
initially. The clusters themselves are actually collapsed periodically when their number goes
over the maximum number of clusters and the distanceCutoff is increased.
So, the returned value is only an initial estimate.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - the datapoints whose distance is to be estimated.</dd>
<dd><code>distanceMeasure</code> - the distance measure used to compute the distance between two points.</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the minimum distance between the first sampleLimit points</dd>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../../org/apache/mahout/clustering/streaming/cluster/StreamingKMeans.html#clusterInternal-java.lang.Iterable-boolean-"><code>StreamingKMeans.clusterInternal(Iterable, boolean)</code></a></dd>
</dl>
</li>
</ul>
<a name="estimateDistanceCutoff-java.lang.Iterable-org.apache.mahout.common.distance.DistanceMeasure-int-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>estimateDistanceCutoff</h4>
<pre>public static&nbsp;&lt;T extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;double&nbsp;estimateDistanceCutoff(<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;T&gt;&nbsp;data,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure,
int&nbsp;sampleLimit)</pre>
</li>
</ul>
<a name="daviesBouldinIndex-java.util.List-org.apache.mahout.common.distance.DistanceMeasure-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>daviesBouldinIndex</h4>
<pre>public static&nbsp;double&nbsp;daviesBouldinIndex(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/stats/OnlineSummarizer.html?is-external=true" title="class or interface in org.apache.mahout.math.stats">OnlineSummarizer</a>&gt;&nbsp;clusterDistanceSummaries)</pre>
<div class="block">Computes the Davies-Bouldin Index for a given clustering.
See http://en.wikipedia.org/wiki/Clustering_algorithm#Internal_evaluation</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>centroids</code> - list of centroids</dd>
<dd><code>distanceMeasure</code> - distance measure for inter-cluster distances</dd>
<dd><code>clusterDistanceSummaries</code> - summaries of the clusters; See summarizeClusterDistances</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Davies-Bouldin Index</dd>
</dl>
</li>
</ul>
<a name="dunnIndex-java.util.List-org.apache.mahout.common.distance.DistanceMeasure-java.util.List-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>dunnIndex</h4>
<pre>public static&nbsp;double&nbsp;dunnIndex(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;centroids,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;<a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/stats/OnlineSummarizer.html?is-external=true" title="class or interface in org.apache.mahout.math.stats">OnlineSummarizer</a>&gt;&nbsp;clusterDistanceSummaries)</pre>
<div class="block">Computes the Dunn Index of a given clustering. See http://en.wikipedia.org/wiki/Dunn_index</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>centroids</code> - list of centroids</dd>
<dd><code>distanceMeasure</code> - distance measure to compute inter-centroid distance with</dd>
<dd><code>clusterDistanceSummaries</code> - summaries of the clusters; See summarizeClusterDistances</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Dunn Index</dd>
</dl>
</li>
</ul>
<a name="choose2-double-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>choose2</h4>
<pre>public static&nbsp;double&nbsp;choose2(double&nbsp;n)</pre>
</li>
</ul>
<a name="getConfusionMatrix-java.util.List-java.util.List-java.lang.Iterable-org.apache.mahout.common.distance.DistanceMeasure-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getConfusionMatrix</h4>
<pre>public static&nbsp;<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;getConfusionMatrix(<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;rowCentroids,
<a href="http://docs.oracle.com/javase/7/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a>&lt;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;columnCentroids,
<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;datapoints,
<a href="../../../../org/apache/mahout/common/distance/DistanceMeasure.html" title="interface in org.apache.mahout.common.distance">DistanceMeasure</a>&nbsp;distanceMeasure)</pre>
<div class="block">Creates a confusion matrix by searching for the closest cluster of both the row clustering and column clustering
of a point and adding its weight to that cell of the matrix.
It doesn't matter which clustering is the row clustering and which is the column clustering. If they're
interchanged, the resulting matrix is the transpose of the original one.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>rowCentroids</code> - clustering one</dd>
<dd><code>columnCentroids</code> - clustering two</dd>
<dd><code>datapoints</code> - datapoints whose closest cluster we need to find</dd>
<dd><code>distanceMeasure</code> - distance measure to use</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the confusion matrix</dd>
</dl>
</li>
</ul>
<a name="getAdjustedRandIndex-org.apache.mahout.math.Matrix-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAdjustedRandIndex</h4>
<pre>public static&nbsp;double&nbsp;getAdjustedRandIndex(<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;confusionMatrix)</pre>
<div class="block">Computes the Adjusted Rand Index for a given confusion matrix.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>confusionMatrix</code> - confusion matrix; not to be confused with the more restrictive ConfusionMatrix class</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the Adjusted Rand Index</dd>
</dl>
</li>
</ul>
<a name="totalWeight-java.lang.Iterable-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>totalWeight</h4>
<pre>public static&nbsp;double&nbsp;totalWeight(<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;? extends <a href="http://mahout.apache.org/mahout-math/apidocs/org/apache/mahout/math/Vector.html?is-external=true" title="class or interface in org.apache.mahout.math">Vector</a>&gt;&nbsp;data)</pre>
<div class="block">Computes the total weight of the points in the given Vector iterable.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>data</code> - iterable of points</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>total weight</dd>
</dl>
</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/ClusteringUtils.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/Cluster.html" title="interface in org.apache.mahout.clustering"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../org/apache/mahout/clustering/GaussianAccumulator.html" title="interface in org.apache.mahout.clustering"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/apache/mahout/clustering/ClusteringUtils.html" target="_top">Frames</a></li>
<li><a href="ClusteringUtils.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>Constr&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>Constr&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>