twitter / cassovary

Cassovary is a simple big graph processing library for the JVM

Home Page:http://twitter.com/cassovary

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement some similarity algorithms

pankajgupta opened this issue · comments

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.