T - type of the tokenpublic class DiceSimilarity<T> extends Object implements SetMetric<T>
dices coefficient (a,b) = (2 * |a & b |) / (|a| + |b|)
This metric is identical to Simon White which operates on lists.
This class is immutable and thread-safe.
| Constructor and Description |
|---|
DiceSimilarity() |
| Modifier and Type | Method and Description |
|---|---|
float |
compare(Set<T> a,
Set<T> b)
Measures the similarity between sets a and b.
|
String |
toString() |
public float compare(Set<T> a, Set<T> b)
SetMetricCopyright © 2014–2018. All rights reserved.