Description Usage Arguments Value Author(s) References Examples
Given a a set of network properties, compute connection probabilities according to the Popularity-Similarity model [Papadopoulos et al. 2012, Nature 489(7417):537-40].
1 | get_theoretical_conn_probs(bins, N, avg.k, gma, Temp)
|
bins |
vector; The hyperbolic distance bins or steps in which theoretical connection probabilities are to be computed. |
N |
integer; Number of network nodes. |
avg.k |
numeric; Network's average node degree. |
gma |
numeric; The network's scaling exponent gamma. |
Temp |
numeric; The network temperature. |
A data frame with the two following elements:
dist |
The considered distance bins. |
prob |
the connection probabilities within each bin. |
Gregorio Alanis-Lobato galanisl@uni-mainz.de
Papadopoulos, F. et al. (2012) Popularity versus similarity in growing networks. Nature 489(7417):537-40.
1 2 3 4 5 6 7 8 9 10 11 12 | # Generate an artificial network with the PS model
net <- ps_model(500, 6, 2.5, 0.1)
# Get the real and theoretical connection probability curves and plot them
conn <- get_conn_probs(net$network, net$polar, 15)
theo <- get_theoretical_conn_probs(conn$dist, vcount(net$network), 6, 2.5, 0.1)
plot(conn$dist, conn$prob, pch = 16,
xlab = "Hyperbolic distance", ylab = "Connection probability")
points(theo$dist, theo$prob, pch = 16,
xlab = "Hyperbolic distance", ylab = "Connection probability", col = "red")
legend("topright", c("Real", "Theory"), pch = c(16, 16), col = c("black", "red"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.