Select Spectral gap analysis.ipynb
to evaluate and plot the spectral gap for the node2vec random walks on empirical networks. The vole network is used in the cell [2].
- One can download the data set from Network Repository. To save the readers' time, we present the hyperlinks for the data used in Fig. 2 in our main text:
Vole, Dolphin, Enron, Jazz, Coauthorship, Email
- If you need to consider a different network data set (other than the Vole network), you can
Step 1. Download the empirical data set from the hyperlink above or some other sources.
Step 2. Replace the code in the cell [2] by your target data set.
Step 3. Restart the kernel in Jupyter notebook.
Select Extended ring network.ipynb
to evaluate and plot the spectral gap for the node2vec random walks on extended ring networks. You can change the number of nodes in the extended ring network by changing size
in cell [3]. The number of nodes in the example code is 100.
Select Two layer extended ring network.ipynb
to evaluate and plot the spectral gap for the node2vec random walks on two-layer extended ring networks. You can change the number of nodes in mono-layer size
in cell [3] is the same as
Select Mean coalescence time.ipynb
to evaluate and plot the mean coalescence time on two-clique networks. You can change the initial conditions, clique size, and weight of the bridge by changing p
, size
, and weight
respectively. Note that the variable size
in cell [3] is the same as
Please run Relaxation time.ipynb
to see the numerical result. If you need to consider a different network other than the vole network, change the code in cells [2] and [6]. The instruction is the same as the one in Spectral gap for empirical networks
.