Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Commit c184c4a

Browse files
author
Mark Needham
committed
update the function example in the docs
1 parent b27d32d commit c184c4a

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

doc/asciidoc/similarity-overlap.adoc

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,8 @@ The procedures parallelize the computation and are therefore a better bet when c
3636
== Use-cases - when to use the Overlap Similarity algorithm
3737

3838
// tag::use-case[]
39-
We can use the Overlap Similarity algorithm to work out the similarity between two things.
40-
We might then use the computed similarity as part of a recommendation query.
41-
For example, you can use the Overlap Similarity algorithm to show the products that were purchased by similar customers, in terms of previous products purchased.
39+
We can use the Overlap Similarity algorithm to work out which things are subsets of others.
40+
We might then use these computed subsets to https://jbarrasa.com/2017/03/31/quickgraph5-learning-a-taxonomy-from-your-tagged-data/[learn a taxonomy from tagged data^], as described by Jesús Barrasa.
4241
// end::use-case[]
4342

4443

@@ -56,19 +55,19 @@ include::scripts/similarity-overlap.cypher[tag=function]
5655
[opts="header",cols="1"]
5756
|===
5857
| `similarity`
59-
| 0.4
58+
| 0.66
6059
|===
6160
// end::function[]
6261

6362
// tag::function-explanation[]
64-
These two lists of numbers have a Overlap similarity of 0.4.
63+
These two lists of numbers have an Overlap similarity of 0.66.
6564
We can see how this result is derived by breaking down the formula:
6665

6766
```
68-
J(A,B) = ∣A ∩ B∣ / ∣A∣ + ∣B∣ - ∣A ∩ B|
69-
J(A,B) = 2 / 3 + 4 - 2
70-
= 2 / 5
71-
= 0.4
67+
O(A,B) = ∣A ∩ B∣ / min(∣A∣,∣B∣)
68+
O(A,B) = 2 / min(3,4)
69+
= 2 / 3
70+
= 0.66
7271
```
7372
// end::function-explanation[]
7473

0 commit comments

Comments
 (0)