Methods
(static) similarity(s1, s2) → {float}
Calculates the Jaccard similarity coefficient between two sets.
Parameters:
Name | Type | Description |
---|---|---|
s1 |
Set.<any> | The first set for comparison. |
s2 |
Set.<any> | The second set for comparison. |
- Source:
Returns:
- The Jaccard similarity coefficient between the two sets, ranging from 0.0 (no similarity) to 1.0 (perfect similarity).
- Type
- float