| Modifier and Type | Field and Description |
|---|---|
| private final DistanceMeasure | measure
The distance measure to use when evaluating the cluster. |
| Access | Constructor and Description |
|---|---|
| public | |
| public | ClusterEvaluator(final DistanceMeasure
the distance measure to use measure)Creates a new cluster evaluator with the given distance measure. |
| Modifier and Type | Method and Description |
|---|---|
| protected Clusterable | Returns: the computed centroid for the cluster, ornull if the cluster does not contain any pointsthe cluster cluster)Computes the centroid for a cluster. |
| protected double | Returns: the distance between the two clusterablesthe first clusterable p1, final Clusterable the second clusterable p2)Calculates the distance between two |
| public boolean | Returns: true if the first score is considered to be better, false otherwisethe first score score1, double the second score score2)Returns whether the first evaluation score is considered to be better than the second one by this evaluator. |
| public abstract double |
| measure | back to summary |
|---|---|
| private final DistanceMeasure measure The distance measure to use when evaluating the cluster. | |
| ClusterEvaluator | back to summary |
|---|---|
| public ClusterEvaluator() Creates a new cluster evaluator with an | |
| ClusterEvaluator | back to summary |
|---|---|
| public ClusterEvaluator(final DistanceMeasure measure) Creates a new cluster evaluator with the given distance measure.
| |
| centroidOf | back to summary |
|---|---|
| protected Clusterable centroidOf(final Cluster<T> cluster) Computes the centroid for a cluster.
| |
| distance | back to summary |
|---|---|
| protected double distance(final Clusterable p1, final Clusterable p2) Calculates the distance between two
| |
| isBetterScore | back to summary |
|---|---|
| public boolean isBetterScore(double score1, double score2) Returns whether the first evaluation score is considered to be better than the second one by this evaluator. Specific implementations shall override this method if the returned scores do not follow the same ordering, i.e. smaller score is better.
| |
| score | back to summary |
|---|---|
| public abstract double score(List<? extends Cluster<T>> clusters) Computes the evaluation score for the given list of clusters. | |