Schematic representation of the
The
In the
- a hidden degree
$\kappa_i$ , quantifying its popularity, influence, or importance, - a position in
$D$ -dimensional similarity space chosen uniformly at random, and represented as a point on a$D$ -dimensional sphere. For instance for$D=1$ the similarity space is represented as a circle, for$D=2$ as a sphere (see Figure above).
The connection probability between any pair of nodes increases with
the product of their hidden degrees (i.e., their combined popularities),
and decreases with the angular distance between the two nodes.
Specifically, nodes
where
The
where
where
is a good approximation of the hyperbolic distance between two nodes separated
by an angular distance
There are two types of possible usage:
- Generate synthetic networks with specified parameters
- Infer a set of hidden degrees and parameter
$\beta$ from the input network. Based on them generate synthetic networks from the model.
Ad. 1.
Compile code (c++17 or higher is required)
g++ -O3 -std=c++17 -lboost_system -lboost_math_c99 src/generatingSD_unix.cpp -o genSD
Run the code
./genSD -d <dimension_value> -b <beta_value> -n <network_size> -g <gamma> -k <mean_degree>
The program accepts the following parameters:
-
-d
- Dimension of the model -
-b
- Value of the inverse temperature$\beta$ (positive value) -
-n
- Size of the network -
-g
- Exponent of the power-law distribution for hidden degrees. -
-k
- Mean degree of the network -
-v
- (optional) Save generated coordinates to .gen_coord file
The set of kappas will be generated from the power-law degree distribution with specified
If you want to use your own set of kappas, you can run code as
./generateSD -d <dimension_value> -b <beta_value> -l <path_to_kappas>
In this case parameters -n
, -g
, and -k
are unnecessary.
Ad. 2.
Compile code (c++17 or higher is required)
gfortran -O3 include/trapecis_Sd.f -c -o include/trapecis_Sd.o
g++ -O3 -std=c++17 -lgfortran -I include/ include/trapecis_Sd.o src/infer_kappas_beta_unix.cpp -o infer_kappas_beta
Infer the hidden degrees and parameter
./infer_kappas_beta -d <dimension_value> <edgelist_filename>
The code generates two files:
-
.inf_log
with network information and value of inferred$\beta$ -
.kappas
with a set of inferred hidden degrees
Later you can use .kappas
file as the input to the ./generateSD
program. See Ad. 1 for more information.
See also tutorial
Generate network with specified parameters:
./generateSD -d 1 -b 1.5 -n 100 -g 2.7 -k 10
It will create a
Generate network with predefined hidden degrees:
for i in `seq 1 1000`; do; echo 10; done > kappas.txt
./generateSD -d 2 -b 3 -l kappas.txt
It will create a
Infer hidden degrees and parameter
./infer_kappas_beta -d 2 <path to edgelist>
./generateSD -d 2 -b <inferred beta> <path to .kappas file>
It will create a <path to edgelist>
with inferred set of