This commit is contained in:
Yomguithereal 2018-06-01 19:59:24 +02:00
parent a5e9bd85da
commit 1359a0d6db
1 changed files with 4 additions and 0 deletions

View File

@ -38,6 +38,8 @@ sparse_cosine_similarity({'apple': 34, 'pear': 3}, {'pear': 1, 'orange': 1})
* **A** *Counter*: first weighted set. Must be a dictionary mapping keys to weights.
* **B** *Counter*: second weighted set. Muset be a dictionary mapping keys to weights.
---
#### jaccard_similarity
Computes the Jaccard similarity of two arbitrary iterables.
@ -55,6 +57,8 @@ jaccard_similarity('context', 'contact')
* **A** *iterable*: first sequence to compare.
* **B** *iterable*: second sequence to compare.
---
#### weighted_jaccard_similarity
Computes the weighted Jaccard similarity of two weighted sets. Those sets have to be represented as counters.