public class RandIndex
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
RandIndex.CategoryExtractor |
Constructor and Description |
---|
RandIndex() |
Modifier and Type | Method and Description |
---|---|
static float |
computeAdjustedRandIndex(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
short[] clusterIds2,
int clusterCnt2)
Compute Adjusted Rand index.
|
static float |
computeRandIndex(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
RandIndex.CategoryExtractor extract)
Compute Rand index.
|
static void |
computeUnsupervisedAdjustedAndOriginalRandIndex(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
short[] randomClusterIds,
int randomClusterCnt,
float[] thresholds) |
static void |
computeUnsupervisedAdjustedAndOriginalRandIndex(DistanceMatrix distances,
short[] clusterIds,
int clusterCnt,
short[] randomClusterIds,
int randomClusterCnt,
float[] thresholds)
Compute Unsupervised Adjusted Rand index.
|
static void |
computeUnsupervisedAdjustedAndOriginalRandIndexOnSoftAssignement(DistanceMatrix distances,
short[][] clusterIds,
int clusterCnt,
short[][] randomClusterIds,
int randomClusterCnt,
float[] thresholds) |
static void |
computeUnsupervisedAdjustedAndOriginalRandIndexOnVoting(DistanceMatrix distances,
short[][] clusterIds,
short[] clusterCnt,
short[][] randomClusterIds,
short[] randomClusterCnt,
int[] votingParams,
float[] thresholds) |
static void |
computeUnsupervisedAdjustedRandIndex(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
short[] randomClusterIds,
int randomClusterCnt,
float[] thresholds) |
static float |
computeUnsupervisedAdjustedRandIndexObsolete(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
float similarityDistanceThrehold,
float dissimilarityDistanceThreshold)
Deprecated.
The computation of ground truth is not correctly done (multi-label assigment), so the prerequisites of partitioning are not
satisfied here. It results to unpredictable results (larger than one, smaller than zero).
|
static UnsupervisedBinaryClassification |
computeUnsupervisedAndRandomBinaryClassification(DistanceMatrix distances,
short[][] clusterIds,
int clusterCnt,
short[][] clusterIdsRand,
int clusterCntRand,
UnsupervisedBinaryClassification cf,
UnsupervisedBinaryClassification cfRand)
Binary classification on soft-assigned clustering
|
static VotingSchemaSetsUnsupervisedBinaryClassification |
computeUnsupervisedAndRandomBinaryClassification(DistanceMatrix distances,
short[][] clusterIds,
short[] clusterCnts,
short[][] clusterIdsRand,
short[] clusterCntRands,
VotingSchemaSetsUnsupervisedBinaryClassification cf,
VotingSchemaSetsUnsupervisedBinaryClassification cfRand) |
static UnsupervisedBinaryClassification |
computeUnsupervisedAndRandomBinaryClassification(DistanceMatrix distances,
short[] clusterIds,
int clusterCnt,
short[] clusterIdsRand,
int clusterCntRand,
UnsupervisedBinaryClassification cf,
UnsupervisedBinaryClassification cfRand) |
static UnsupervisedBinaryClassification |
computeUnsupervisedBinaryClassification(DistanceMatrix distances,
short[] clusterIds,
int clusterCnt,
float[] thresholds)
TODO: Update docs:
|
static float |
computeUnsupervisedDisaIndex(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
float similarityDistanceThrehold,
float dissimilarityDistanceThreshold)
Compute Unsupervised "DISA lab" index.
|
static void |
computeUnsupervisedRandIndex(AbstractObjectList<LocalAbstractObject> database,
short[] clusterIds,
int clusterCnt,
float[] thresholds)
Compute Unsupervised Rand index.
|
static float[] |
parseThresholds(java.lang.String s) |
static short[] |
randomClustering(int size,
int clusterCnt)
Auxiliary method to obtain random clustering.
|
static short[][] |
randomClusterings(int size,
short[] clusterCnt)
Auxiliary method to obtain more random clusterings.
|
public static float[] parseThresholds(java.lang.String s)
public static short[] randomClustering(int size, int clusterCnt)
size
- size of database (this number of IDs is returned)clusterCnt
- number of clusters.public static short[][] randomClusterings(int size, short[] clusterCnt)
size
- size of database (this number of IDs is returned)clusterCnt
- size of individual clusterings.public static float computeRandIndex(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, RandIndex.CategoryExtractor extract)
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)public static float computeAdjustedRandIndex(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, short[] clusterIds2, int clusterCnt2)
database
- list of all objectsclusterIds
- first clustring - membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt
- first clustring - total number of clusters (cluster IDs must be from 0 to clusterCnt-1)clusterIds2
- second clustring - membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt2
- second clustring - total number of clusters (cluster IDs must be from 0 to clusterCnt-1)public static UnsupervisedBinaryClassification computeUnsupervisedAndRandomBinaryClassification(DistanceMatrix distances, short[] clusterIds, int clusterCnt, short[] clusterIdsRand, int clusterCntRand, UnsupervisedBinaryClassification cf, UnsupervisedBinaryClassification cfRand)
public static UnsupervisedBinaryClassification computeUnsupervisedAndRandomBinaryClassification(DistanceMatrix distances, short[][] clusterIds, int clusterCnt, short[][] clusterIdsRand, int clusterCntRand, UnsupervisedBinaryClassification cf, UnsupervisedBinaryClassification cfRand)
public static VotingSchemaSetsUnsupervisedBinaryClassification computeUnsupervisedAndRandomBinaryClassification(DistanceMatrix distances, short[][] clusterIds, short[] clusterCnts, short[][] clusterIdsRand, short[] clusterCntRands, VotingSchemaSetsUnsupervisedBinaryClassification cf, VotingSchemaSetsUnsupervisedBinaryClassification cfRand)
public static UnsupervisedBinaryClassification computeUnsupervisedBinaryClassification(DistanceMatrix distances, short[] clusterIds, int clusterCnt, float[] thresholds)
for documentation.
public static void computeUnsupervisedRandIndex(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, float[] thresholds)
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)similarityDistanceThrehold
- objects distant up to this threshold (inclusively) are expected to be in the same classdissimilarityDistanceThreshold
- objects distant more than this threshold (exclusively) are expected to be in different classes.public static void computeUnsupervisedAdjustedAndOriginalRandIndex(DistanceMatrix distances, short[] clusterIds, int clusterCnt, short[] randomClusterIds, int randomClusterCnt, float[] thresholds)
distances
- matrix of pair-wise distances among all objects in a databaseclusterIds
- clustering - membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt
- clustering - total number of clusters (cluster IDs must be from 0 to clusterCnt-1)similarityDistanceThrehold
- objects distant up to this threshold (inclusively) are expected to be in the same classdissimilarityDistanceThreshold
- objects distant more than this threshold (exclusively) are expected to be in different classes.http://www.jmlr.org/papers/volume11/vinh10a/vinh10a.pdf
public static void computeUnsupervisedAdjustedAndOriginalRandIndexOnSoftAssignement(DistanceMatrix distances, short[][] clusterIds, int clusterCnt, short[][] randomClusterIds, int randomClusterCnt, float[] thresholds)
public static void computeUnsupervisedAdjustedAndOriginalRandIndexOnVoting(DistanceMatrix distances, short[][] clusterIds, short[] clusterCnt, short[][] randomClusterIds, short[] randomClusterCnt, int[] votingParams, float[] thresholds)
public static void computeUnsupervisedAdjustedAndOriginalRandIndex(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, short[] randomClusterIds, int randomClusterCnt, float[] thresholds)
public static void computeUnsupervisedAdjustedRandIndex(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, short[] randomClusterIds, int randomClusterCnt, float[] thresholds)
public static float computeUnsupervisedAdjustedRandIndexObsolete(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, float similarityDistanceThrehold, float dissimilarityDistanceThreshold)
database
- list of all objectsclusterIds
- clustering - membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt
- clustering - total number of clusters (cluster IDs must be from 0 to clusterCnt-1)similarityDistanceThrehold
- objects distant up to this threshold (inclusively) are expected to be in the same classdissimilarityDistanceThreshold
- objects distant more than this threshold (exclusively) are expected to be in different classes.http://www.jmlr.org/papers/volume11/vinh10a/vinh10a.pdf
public static float computeUnsupervisedDisaIndex(AbstractObjectList<LocalAbstractObject> database, short[] clusterIds, int clusterCnt, float similarityDistanceThrehold, float dissimilarityDistanceThreshold)
database
- list of all objectsclusterIds
- clustering - membership of an object to a cluster (ordering must be the same as in database); clusters are identfied by their IDsclusterCnt
- clustering - total number of clusters (cluster IDs must be from 0 to clusterCnt-1)similarityDistanceThrehold
- objects distant up to this threshold (inclusively) are expected to be in the same classdissimilarityDistanceThreshold
- objects distant more than this threshold (exclusively) are expected to be in different classes.on http://www.jmlr.org/papers/volume11/vinh10a/vinh10a.pdf