Package elki.similarity.cluster
Class ClusteringRandIndexSimilarity
- java.lang.Object
-
- elki.similarity.cluster.ClusteringRandIndexSimilarity
-
- All Implemented Interfaces:
Distance<Clustering<?>>
,PrimitiveDistance<Clustering<?>>
,ClusteringDistanceSimilarity
,PrimitiveSimilarity<Clustering<?>>
,Similarity<Clustering<?>>
@Reference(authors="W. M. Rand", title="Objective Criteria for the Evaluation of Clustering Methods", booktitle="Journal of the American Statistical Association, Vol. 66 Issue 336", url="https://doi.org/10.2307/2284239", bibkey="doi:10.2307/2284239") public class ClusteringRandIndexSimilarity extends java.lang.Object implements ClusteringDistanceSimilarity
Measure the similarity of clusters via the Rand Index.Reference:
W. M. Rand
Objective Criteria for the Evaluation of Clustering Methods
Journal of the American Statistical Association, Vol. 66 Issue 336- Since:
- 0.7.0
- Author:
- Erich Schubert
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClusteringRandIndexSimilarity.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static ClusteringRandIndexSimilarity
STATIC
Static instance.
-
Constructor Summary
Constructors Constructor Description ClusteringRandIndexSimilarity()
Constructor - use the static instanceSTATIC
!
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description double
distance(Clustering<?> o1, Clustering<?> o2)
Computes the distance between two given DatabaseObjects according to this distance function.SimpleTypeInformation<? super Clustering<?>>
getInputTypeRestriction()
Get the input data type of the function.<T extends Clustering<?>>
DistanceSimilarityQuery<T>instantiate(Relation<T> relation)
Instantiate with a representation to get the actual similarity query.boolean
isMetric()
Is this distance function metric (satisfy the triangle inequality)double
similarity(Clustering<?> o1, Clustering<?> o2)
Computes the similarity between two given DatabaseObjects according to this similarity function.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface elki.similarity.cluster.ClusteringDistanceSimilarity
isSymmetric
-
-
-
-
Field Detail
-
STATIC
public static final ClusteringRandIndexSimilarity STATIC
Static instance.
-
-
Constructor Detail
-
ClusteringRandIndexSimilarity
public ClusteringRandIndexSimilarity()
Constructor - use the static instanceSTATIC
!
-
-
Method Detail
-
similarity
public double similarity(Clustering<?> o1, Clustering<?> o2)
Description copied from interface:PrimitiveSimilarity
Computes the similarity between two given DatabaseObjects according to this similarity function.- Specified by:
similarity
in interfacePrimitiveSimilarity<Clustering<?>>
- Parameters:
o1
- first DatabaseObjecto2
- second DatabaseObject- Returns:
- the similarity between two given DatabaseObjects according to this similarity function
-
distance
public double distance(Clustering<?> o1, Clustering<?> o2)
Description copied from interface:PrimitiveDistance
Computes the distance between two given DatabaseObjects according to this distance function.- Specified by:
distance
in interfacePrimitiveDistance<Clustering<?>>
- Parameters:
o1
- first DatabaseObjecto2
- second DatabaseObject- Returns:
- the distance between two given DatabaseObjects according to this distance function
-
isMetric
public boolean isMetric()
Description copied from interface:Distance
Is this distance function metric (satisfy the triangle inequality)- Specified by:
isMetric
in interfaceDistance<Clustering<?>>
- Returns:
true
when metric.
-
instantiate
public <T extends Clustering<?>> DistanceSimilarityQuery<T> instantiate(Relation<T> relation)
Description copied from interface:Similarity
Instantiate with a representation to get the actual similarity query.- Specified by:
instantiate
in interfaceClusteringDistanceSimilarity
- Specified by:
instantiate
in interfaceDistance<Clustering<?>>
- Specified by:
instantiate
in interfacePrimitiveDistance<Clustering<?>>
- Specified by:
instantiate
in interfacePrimitiveSimilarity<Clustering<?>>
- Specified by:
instantiate
in interfaceSimilarity<Clustering<?>>
- Parameters:
relation
- Representation to use- Returns:
- Actual distance query.
-
getInputTypeRestriction
public SimpleTypeInformation<? super Clustering<?>> getInputTypeRestriction()
Description copied from interface:Similarity
Get the input data type of the function.- Specified by:
getInputTypeRestriction
in interfaceDistance<Clustering<?>>
- Specified by:
getInputTypeRestriction
in interfacePrimitiveDistance<Clustering<?>>
- Specified by:
getInputTypeRestriction
in interfaceSimilarity<Clustering<?>>
- Returns:
- Type restriction
-
-