public class ClusterEvaluator extends Object
Constructor and Description |
---|
ClusterEvaluator(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.Path clustersIn)
Initialize a new instance from job information
|
ClusterEvaluator(Map<Integer,List<VectorWritable>> representativePoints,
List<Cluster> clusters,
DistanceMeasure measure)
For testing only
|
Modifier and Type | Method and Description |
---|---|
double |
interClusterDensity()
Computes the inter-cluster density as defined in "Mahout In Action"
|
Map<Integer,Vector> |
interClusterDistances()
Computes the inter-cluster distances
|
Vector |
intraClusterDensities()
Computes the intra-cluster densities for all clusters as the average distance of the representative points from
each other
|
double |
intraClusterDensity()
Computes the average intra-cluster density as the average of each cluster's intra-cluster density
|
public ClusterEvaluator(Map<Integer,List<VectorWritable>> representativePoints, List<Cluster> clusters, DistanceMeasure measure)
representativePoints
- a Mapclusters
- a Mapmeasure
- an appropriate DistanceMeasurepublic ClusterEvaluator(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.fs.Path clustersIn)
conf
- a Configuration with appropriate parametersclustersIn
- a String path to the input clusters directorypublic double interClusterDensity()
public Map<Integer,Vector> interClusterDistances()
public double intraClusterDensity()
public Vector intraClusterDensities()
Copyright © 2008–2017 The Apache Software Foundation. All rights reserved.