Jaccard index: Difference between revisions
→{{header|Wren}}: Added self pairings - every time I look at this the task description has changed!
(→{{header|Wren}}: Updated in line with task description.) |
(→{{header|Wren}}: Added self pairings - every time I look at this the task description has changed!) |
||
Line 97:
var pairs = [
[a, a], [a, b], [a, c], [a, d], [a, e], [a, f], [b, b], [b, c], [b, d], [b, e], [b, f],
[
]
var names = [
"AA", "AB", "AC", "AD", "AE", "AF", "BB", "BC", "BD", "BE", "BF",
"
]
Line 122:
F = [8]
J(A, A) = 1
J(A, B) = 0
J(A, C) = 0
Line 127 ⟶ 128:
J(A, E) = 0
J(A, F) = 0
J(B, B) = 1
J(B, C) = 0.428571
J(B, D) = 0.25
J(B, E) = 0.5
J(B, F) = 0
J(C, C) = 1
J(C, D) = 0
J(C, E) = 0.5
J(C, F) = 0
J(D, D) = 1
J(D, E) = 0.125
J(D, F) = 0.2
J(E, E) = 1
J(E, F) = 0
J(F, F) = 1
</pre>
|