public class SilhouetteIndex
extends java.lang.Object
Constructor and Description |
---|
SilhouetteIndex() |
Modifier and Type | Method and Description |
---|---|
static float |
compute(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt)
Compute silhouette index.
|
static float |
compute(DistanceMatrix distances,
short[] clusterIds,
int clusterCnt)
Compute silhouette index.
|
public static float compute(DistanceMatrix distances, short[] clusterIds, int clusterCnt)
distances
- distances between database objects (elements over the main diagnal are enough)clusterIds
- membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt
- total number of clusters (cluster IDs must be from 0 to clusterCnt-1)public static float compute(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt)
database
- list of all objectsclusterIds
- membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt
- total number of clusters (cluster IDs must be from 0 to clusterCnt-1)