Description Usage Arguments Value Author(s) Examples
View source: R/link_predictors.R
Given a network of interest and a matrix of pairwise node (dis-)similarities produced by some algorithm, it computes the likelihood score of interaction, for all disconnected node pairs, based on such (dis-)similarities.
1 |
g |
igraph; The network of interest. |
m |
matrix; A square matrix of pairwise node (dis-)similarities. |
type |
character; One of "sim" or "dis", which indicate whether the matrix stores similarities (high values -> higher likelihood of interaction) or dissimilarities (low values -> higher likelihood of interaction). |
Tibble with the following columns:
nodeA |
The ID of a network node. |
nodeB |
The ID of a network node. |
scr |
The likelihood score of interaction for the node pair. |
Gregorio Alanis-Lobato galanisl@uni-mainz.de
1 2 3 4 5 6 | # Compute a node similarity matrix with one of the algorithms included in
# igraph
dice <- igraph::similarity(karate_club, method = "dice")
# Now compute likelihood scores for disconnected node pairs with this matrix
sim <- lp_matrix(g = karate_club, dice, type = "sim")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.