The Euclidean distance is a measure of the distance between two points. It is an extension of the distance metrics in a Cartesian plane, and is computed using the following formula:
d(u, v) = √( (u1 - v1)2 + (u2 - v2)2 + ... + (un - vn)2)
Instead of simply counting the number of repositories each pair of users has in common, we can try to quantify the distance between their vectors of contribution. Let's make it clearer with an example. We will add a new property to some relationships, to count how often users contributed to a given repository:
MATCH (u1:User {login: "systay"})-[ct1]->(repo)
SET ct1.nContributions = round(rand() * 10)
I'm using random numbers here for simplicity, but it means your result may differ. If we do the same thing for another user, for instance, chrisvest, we can then create the vector of contributions of each user to each of the repositories:
MATCH (u1:User {login: 'chrisvest'})-[ct1]->(repo)
MATCH...