Description Usage Arguments Details Value References Examples
General function for calculating several types of vertex proximities in a graph.
1 2 3 4 5 6 7 8 9 |
graph |
an object of class |
... |
additional arguments specific for a selected measure |
method |
single character, the method to be used, see Details |
v1, v2 |
vectors of vertices between which similarity will be calculated. Character vector is interpreted as vertex names. Numeric vector as vertex ids. |
value |
a character string giving a type of the object that should be
returned. This must be one of " |
This function calculates vertex proximities in graph graph with the
selected method. The graph has to be undirected and connected.
Some of the methods support computation only for selected vertices, which
should be more efficient when needed. Supplying vertex IDs or names (if
present in the graph) to v1 and v2 will calculate
proximities of v1 x v2.
The following methods are available (see vignette("proxfun",
package="linkprediction") for more details and formal definitions):
aaAdamic-Adar index (Adamic and Adar 2001). Additional arguments are passed to igraph::similarity.
actAverage Commute Time (Fouss, Pirotte, Renders, and Saerens 2007)
act_nNormalized Average Commute Time (Fouss et al. 2007)
cnCommon Neighbours
cosCosine similarity (Salton and McGill 1986)
cos_lcosine similarity on L+ (Fouss et al. 2007)
distgraph distance
hdiHub Depressed Index (Ravasz, Somera, Mongru, Oltvai, and Barabasi 2002)
hpiHub Promoted Index (Ravasz et al. 2002)
jaccardJaccard coefficient (Jaccard 1912)
katzKatz index (Katz 1953)
lL+ directly (Fouss et al. 2007)
lhn_localLeicht-Holme-Newman Index (Leicht, Holme, and Newman 2006)
lhn_globalLeicht-Holme-Newman Index global version (Leicht et al. 2006)
lpLocal Path Index (Zhou, Lu, and Zhang 2009)
mfMatrix Forest Index (Chebotarev P. Yu. 1997)
papreferential attachment (Barabasi and Albert 1999)
raresource allocation (Zhou et al. 2009)
rwrrandom walk with restart (Brin and Page 1998). Additional argument alpha (default value 0.3) is the probability that the walk will restart after a step.
sorsorensen index/dice coefficient (Sorensen 1948)
If value = "matrix" a matrix with length(v1) rows and
length(v2) with rownames and colnames equal to v1
and v2 respectively. If value = "edgelist" a data.frame
with three columns:
ID of a start node of an edge
ID of an end node of an edge
similarity score for that edge
Edges with similarity score 0 are omitted. If value = "graph" an
object of class igraph or network, depending on the class of
input graph. Returned graph has the same structure (graph and node
attributes, etc.) as the input graph, except for edges - original edges are
skipped, and new edges with positive similarity score are added. Edged
attribute "weight" indicates similarity score.
Adamic L and Adar E (2003). "Friends and Neighbors on the Web." Social Networks, 25, pp. 211-230 doi: 10.1016/S0378-8733(03)00009-1.
Barabasi A and Albert R (1999). "Emergence of Scaling in Random Networks." Science, 286(5439), pp. 509-512.
Brin S and Page L (1998). "The anatomy of a large-scale hypertextual Web search engine ." _Computer Networks and ISDN Systems _, 30(1-7), pp. 107 - 117. Proceedings of the Seventh International World Wide Web Conference .
Chebotarev P. Yu. SEV (1997). "The matrix-forest theorem and measuring relations in small social groups ." _Automation and Remote Control _, 58(9), pp. 1505-1514.
Fouss F, Pirotte A, Renders J and Saerens M (2007). "Random-Walk Computation of Similarities Between Nodes of a Graph with Application to Collaborative Recommendation." IEEE Transactions on Knowledge and Data Engineering, 19(3), pp. 355-369 doi: 10.1109/TKDE.2007.46.
Jaccard P (1912). "The Distribution of the Flora in the Alpine Zone 1" New Phytologist, 11(2), pp. 37-50.
Katz L (1953). "A new status index derived from sociometric analysis." Psychometrika, 18(1), pp. 39-43.
Leicht EA, Holme P and Newman MEJ (2006). "Vertex similarity in networks." Phys. Rev. E, 73(2), pp. 026120 doi: 10.1103/PhysRevE.73.026120.
Ravasz E, Somera AL, Mongru DA, Oltvai ZN and Barabasi A (2002). "Hierarchical Organization of Modularity in Metabolic Networks." Science, 297(5586), pp. 1551-1555.
Salton G and McGill MJ (1986). Introduction to Modern Information Retrieval. McGraw-Hill, Inc., New York, NY, USA.
Sorensen T (1948). "A Method of Establishing Groups of Equal Amplitude in Plant Sociology Based on Similarity of Species Content and Its Application to Analyses of the Vegetation on Danish Commons." Biologiske Skrifter, 5, pp. 1-34.
Zhou T, Lu L and Zhang Y (2009). "Predicting missing links via local information." The European Physical Journal B, 71(4), pp. 623-630 doi: 10.1140/epjb/e2009-00335-8.
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.