generate_BB | R Documentation |
This function generates networks from the Bianconi-Barabási model. It is a ‘preferential attachment with fitness’ model. In this model, the preferential attachment function is linear, i.e. A_k = k
, and node fitnesses are sampled from some probability distribution.
generate_BB(N = 1000 ,
num_seed = 2 ,
multiple_node = 1 ,
m = 1 ,
mode_f = "gamma",
s = 10 )
The parameters can be divided into two groups.
The first group specifies basic properties of the network:
N |
Integer. Total number of nodes in the network (including the nodes in the seed graph). Default value is |
num_seed |
Integer. The number of nodes of the seed graph (the initial state of the network). The seed graph is a cycle. Default value is |
multiple_node |
Positive integer. The number of new nodes at each time-step. Default value is |
m |
Positive integer. The number of edges of each new node. Default value is |
The final group of parameters specifies the distribution from which node fitnesses are generated:
mode_f |
String. Possible values: |
s |
Non-negative numeric. The inverse variance parameter. The mean of the distribution is kept at |
The output is a PAFit_net
object, which is a List contains the following four fields:
graph |
a three-column matrix, where each row contains information of one edge, in the form of |
type |
a string indicates whether the network is |
PA |
a numeric vector contains the true PA function. |
fitness |
fitness values of nodes in the network. The name of each value is the ID of the node. |
Thong Pham thongphamthe@gmail.com
1. Bianconni, G. & Barabási, A. (2001). Competition and multiscaling in evolving networks. Europhys. Lett., 54, 436 (\Sexpr[results=rd]{tools:::Rd_expr_doi("10.1209/epl/i2001-00260-6")}).
For subsequent estimation procedures, see get_statistics
.
For other functions to generate networks, see generate_net
, generate_BA
, generate_ER
and generate_fit_only
.
library("PAFit")
# generate a network from the BB model with alpha = 1, N = 100, m = 1
# The inverse variance of the Gamma distribution of node fitnesses is s = 10
net <- generate_BB(N = 100,m = 1,mode = 1, s = 10)
str(net)
plot(net)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.