similarity.jaccard(graph, vids = V(graph), mode = c("all", "out", "in",
"total"), loops = FALSE)
similarity.dice(graph, vids = V(graph), mode = c("all", "out", "in",
"total"), loops = FALSE)
similarity.invlogweighted(graph, vids = V(graph),
mode = c("all", "out", "in", "total"))
out
in
all
length(vids)
by length(vids)
numeric matrix containing
the similarity scores.similarity.jaccard
calculates
the pairwise Jaccard similarities for some (or all) of the vertices. The Dice similarity coefficient of two vertices is twice the number of common
neighbors divided by the sum of the degrees of the
vertices. similarity.dice
calculates the pairwise Dice
similarities for some (or all) of the vertices.
The inverse log-weighted similarity of two vertices is the number of their common neighbors, weighted by the inverse logarithm of their degrees. It is based on the assumption that two vertices should be considered more similar if they share a low-degree common neighbor, since high-degree common neighbors are more likely to appear even by pure chance. Isolated vertices will have zero similarity to any other vertex. Self-similarities are not calculated. See the following paper for more details: Lada A. Adamic and Eytan Adar: Friends and neighbors on the Web. Social Networks, 25(3):211-230, 2003.
cocitation
and bibcoupling
g <- graph.ring(5)
similarity.dice(g)
similarity.jaccard(g)
Run the code above in your browser using DataCamp Workspace