|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mahout.clustering.ClusteringUtils
public final class ClusteringUtils
| Method Summary | |
|---|---|
static double |
choose2(double n)
|
static double |
daviesBouldinIndex(List<? extends Vector> centroids,
DistanceMeasure distanceMeasure,
List<OnlineSummarizer> clusterDistanceSummaries)
Computes the Davies-Bouldin Index for a given clustering. |
static double |
dunnIndex(List<? extends Vector> centroids,
DistanceMeasure distanceMeasure,
List<OnlineSummarizer> clusterDistanceSummaries)
Computes the Dunn Index of a given clustering. |
static double |
estimateDistanceCutoff(Iterable<? extends Vector> data,
DistanceMeasure distanceMeasure,
int sampleLimit)
|
static double |
estimateDistanceCutoff(List<? extends Vector> data,
DistanceMeasure distanceMeasure)
Estimates the distance cutoff. |
static double |
getAdjustedRandIndex(Matrix confusionMatrix)
Computes the Adjusted Rand Index for a given confusion matrix. |
static Matrix |
getConfusionMatrix(List<? extends Vector> rowCentroids,
List<? extends Vector> columnCentroids,
Iterable<? extends Vector> datapoints,
DistanceMeasure distanceMeasure)
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. |
static List<OnlineSummarizer> |
summarizeClusterDistances(Iterable<? extends Vector> datapoints,
Iterable<? extends Vector> centroids,
DistanceMeasure distanceMeasure)
Computes the summaries for the distances in each cluster. |
static double |
totalClusterCost(Iterable<? extends Vector> datapoints,
Iterable<? extends Vector> centroids)
Adds up the distances from each point to its closest cluster and returns the sum. |
static double |
totalClusterCost(Iterable<? extends Vector> datapoints,
Searcher centroids)
Adds up the distances from each point to its closest cluster and returns the sum. |
static double |
totalWeight(Iterable<? extends Vector> data)
Computes the total weight of the points in the given Vector iterable. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static List<OnlineSummarizer> summarizeClusterDistances(Iterable<? extends Vector> datapoints,
Iterable<? extends Vector> centroids,
DistanceMeasure distanceMeasure)
datapoints - iterable of datapoints.centroids - iterable of Centroids.
public static double totalClusterCost(Iterable<? extends Vector> datapoints,
Iterable<? extends Vector> centroids)
datapoints - iterable of datapoints.centroids - iterable of Centroids.
public static double totalClusterCost(Iterable<? extends Vector> datapoints,
Searcher centroids)
datapoints - iterable of datapoints.centroids - searcher of Centroids.
public static double estimateDistanceCutoff(List<? extends Vector> data,
DistanceMeasure distanceMeasure)
data - the datapoints whose distance is to be estimated.distanceMeasure - the distance measure used to compute the distance between two points.
StreamingKMeans.clusterInternal(Iterable, boolean)
public static double estimateDistanceCutoff(Iterable<? extends Vector> data,
DistanceMeasure distanceMeasure,
int sampleLimit)
public static double daviesBouldinIndex(List<? extends Vector> centroids,
DistanceMeasure distanceMeasure,
List<OnlineSummarizer> clusterDistanceSummaries)
centroids - list of centroidsdistanceMeasure - distance measure for inter-cluster distancesclusterDistanceSummaries - summaries of the clusters; See summarizeClusterDistances
public static double dunnIndex(List<? extends Vector> centroids,
DistanceMeasure distanceMeasure,
List<OnlineSummarizer> clusterDistanceSummaries)
centroids - list of centroidsdistanceMeasure - distance measure to compute inter-centroid distance withclusterDistanceSummaries - summaries of the clusters; See summarizeClusterDistances
public static double choose2(double n)
public static Matrix getConfusionMatrix(List<? extends Vector> rowCentroids,
List<? extends Vector> columnCentroids,
Iterable<? extends Vector> datapoints,
DistanceMeasure distanceMeasure)
rowCentroids - clustering onecolumnCentroids - clustering twodatapoints - datapoints whose closest cluster we need to finddistanceMeasure - distance measure to use
public static double getAdjustedRandIndex(Matrix confusionMatrix)
confusionMatrix - confusion matrix; not to be confused with the more restrictive ConfusionMatrix class
public static double totalWeight(Iterable<? extends Vector> data)
data - iterable of points
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||