Package elki.similarity.cluster
Class ClusteringAdjustedRandIndexSimilarity
- java.lang.Object
-
- elki.similarity.cluster.ClusteringAdjustedRandIndexSimilarity
-
- All Implemented Interfaces:
Distance<Clustering<?>>
,PrimitiveDistance<Clustering<?>>
,ClusteringDistanceSimilarity
,NormalizedSimilarity<Clustering<?>>
,PrimitiveSimilarity<Clustering<?>>
,Similarity<Clustering<?>>
@Reference(authors="L. Hubert, P. Arabie", title="Comparing partitions", booktitle="Journal of Classification 2(193)", url="https://doi.org/10.1007/BF01908075", bibkey="doi:10.1007/BF01908075") public class ClusteringAdjustedRandIndexSimilarity extends java.lang.Object implements ClusteringDistanceSimilarity, NormalizedSimilarity<Clustering<?>>
Measure the similarity of clusters via the Adjusted Rand Index.References:
L. Hubert, P. Arabie
Comparing partitions.
Journal of Classification 2(193)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
ClusteringAdjustedRandIndexSimilarity.Par
Parameterization class.
-
Field Summary
Fields Modifier and Type Field Description static ClusteringAdjustedRandIndexSimilarity
STATIC
Static instance.
-
Constructor Summary
Constructors Constructor Description ClusteringAdjustedRandIndexSimilarity()
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 ClusteringAdjustedRandIndexSimilarity STATIC
Static instance.
-
-
Constructor Detail
-
ClusteringAdjustedRandIndexSimilarity
public ClusteringAdjustedRandIndexSimilarity()
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
-
-