GithubHelp home page GithubHelp logo

mbjallow6 / analysis-of-node2vec-random-walks-on-networks Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lingqi-meng/analysis-of-node2vec-random-walks-on-networks

0.0 1.0 0.0 467 KB

Jupyter Notebook 100.00%

analysis-of-node2vec-random-walks-on-networks's Introduction

Analysis of node2vec random walks on networks

Spectral gap for empirical networks

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.

Spectral gap for empirical networks

Spectral gap for extended ring networks

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.

Spectral gap for extended ring networks

Spectral gap for two-layer extended ring networks

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 $N^\prime$ and the weight $w$ in the two-layer extended ring networks. Note that the variable size in cell [3] is the same as $N^\prime$ in Fig. 6 in our paper, NOT $N$. The number of nodes in mono-layer in our example code is 100, and the weight is 1.

Spectral gap for two-layer extended ring networks

Mean coalescence time evaluation

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 $N/2$ in Fig.9 in our paper, NOT $N$. The initial condition is in the example code is the uniformly random condition. The clique size is 100, i.e., N=200, and weight $w=1$. The other two initial condidtions (the two walkers are initially in the same clique or opposite cliques) can be found at the end of the comments in cell [2].

Mean coalescence time

Dependence of the relaxation speed on the second largest eigenvalue of T

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.

analysis-of-node2vec-random-walks-on-networks's People

Contributors

lingqi-meng avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.