T
- type of the tokenpublic class CosineSimilarity<T> extends Object implements SetMetric<T>
This class is immutable and thread-safe.
Constructor and Description |
---|
CosineSimilarity() |
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)
SetMetric
Copyright © 2014–2018. All rights reserved.