Closed pankajgupta closed 9 years ago
Such as cosine similarity and jaccard similarity when given (1) Two nodes N1 and N2, find the similarity values between them in a given direction (Out or In) (2) One node N1, find the top K similar nodes to N1
Cosine(N1, N2) = neighbors(N1) ∩ neighbors(N2) divided by (sqrt(numNeighbors(N1)) * sqrt(numNeighbors(N2))
and Jaccard(N1,N2) = neighbors(N1) ∩ neighbors(N2) divided by neighbors(N1) ∪ neighbors(N2)
Please add the algorithms in com.twitter.cassovary.algorithms
This could be closed, right? It seems to be already implemented by @AnishShah
That's right. Closing it.
Such as cosine similarity and jaccard similarity when given (1) Two nodes N1 and N2, find the similarity values between them in a given direction (Out or In) (2) One node N1, find the top K similar nodes to N1
Cosine(N1, N2) = neighbors(N1) ∩ neighbors(N2) divided by (sqrt(numNeighbors(N1)) * sqrt(numNeighbors(N2))
and Jaccard(N1,N2) = neighbors(N1) ∩ neighbors(N2) divided by neighbors(N1) ∪ neighbors(N2)
Please add the algorithms in com.twitter.cassovary.algorithms