rapidsai / cugraph

cuGraph - RAPIDS Graph Analytics Library
https://docs.rapids.ai/api/cugraph/stable/
Apache License 2.0
1.67k stars 299 forks source link

[FEA]: Add Cosine Similarity to cuGraph #2993

Closed acostadon closed 1 month ago

acostadon commented 1 year ago

Add a Cosine similarity metric to cuGraph

Example: https://docs.tigergraph.com/graph-ml/current/similarity-algorithms/cosine-similarity-of-neighborhoods-single-source

This is related to question issue #2979

Jaccard similarity is then given by 𝐽(𝐴,𝐵)=|𝐴∩𝐵| / |𝐴∪𝐵|

Cosine similarity is then given by 𝐶(𝐴,𝐵)=|𝐴∩𝐵| / SQR(|A||B|)

ChuckHastings commented 2 months ago

C++ implementation is done. Need to add support for PLC and python