VertexDiceSimilarity[g,u,v]
gives the Dice similarity between vertices u and v of the graph g.
VertexDiceSimilarity[{vw,…},…]
uses rules vw to specify the graph g.
VertexDiceSimilarity
VertexDiceSimilarity[g,u,v]
gives the Dice similarity between vertices u and v of the graph g.
VertexDiceSimilarity[{vw,…},…]
uses rules vw to specify the graph g.
Details
- The vertex Dice similarity is the number of common neighbors of u and v divided by half the sum of the degrees of u and v.
- VertexDiceSimilarity works with undirected graphs, directed graphs, multigraphs, and mixed graphs.
Examples
open all close allBasic Examples (1)
Scope (6)
VertexDiceSimilarity works with undirected graphs:
VertexDiceSimilarity[[image], 1, 2]VertexDiceSimilarity[[image], 1, 2]VertexDiceSimilarity[[image], 1, 2]VertexDiceSimilarity[[image], 1, 4]Use rules to specify the graph:
VertexDiceSimilarity[{1 -> 2, 2 -> 3, 3 -> 1, 3 -> 4}, 1, 2]VertexDiceSimilarity works with large graphs:
g = ExampleData[{"NetworkGraph", "Internet"}];VertexDiceSimilarity[g, 1, 26]//N//TimingProperties & Relations (3)
Use DiceDissimilarity to compute the Dice similarity of a graph:
g = [image];m = Normal[AdjacencyMatrix[g]];{1 - DiceDissimilarity[m[[1]], m[[7]]], VertexDiceSimilarity[g, 1, 7]}The Dice similarity between two vertices is equal to zero if one of them has degree zero:
VertexDiceSimilarity[[image], 1, 4]The Dice similarity between two vertices is equal to 1 if they have the same neighbors:
VertexDiceSimilarity[[image], 1, 2]Related Guides
Text
Wolfram Research (2012), VertexDiceSimilarity, Wolfram Language function, https://reference.wolfram.com/language/ref/VertexDiceSimilarity.html (updated 2015).
CMS
Wolfram Language. 2012. "VertexDiceSimilarity." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/VertexDiceSimilarity.html.
APA
Wolfram Language. (2012). VertexDiceSimilarity. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/VertexDiceSimilarity.html
BibTeX
@misc{reference.wolfram_2026_vertexdicesimilarity, author="Wolfram Research", title="{VertexDiceSimilarity}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/VertexDiceSimilarity.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_vertexdicesimilarity, organization={Wolfram Research}, title={VertexDiceSimilarity}, year={2015}, url={https://reference.wolfram.com/language/ref/VertexDiceSimilarity.html}, note=[Accessed: 13-June-2026]}