Skip to content

Commit 949906e

Browse files
author
Daniel Precioso
committed
Remove redundant headings and introductory notes from NetworkX fundamentals and models notebooks
1 parent 8b12894 commit 949906e

2 files changed

Lines changed: 5 additions & 16 deletions

File tree

modules/networks/fundamentals.qmd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ title: "NetworkX Fundamentals"
33
format: html
44
---
55

6-
# Network X - Fundamentals
7-
86
NetworkX is a Python package for the creation, manipulation, and study of the structure, dynamics, and functions of complex networks.
97

108
This notebook serves as a brief introduction to the NetworkX package. It covers the following topics:

modules/networks/models.qmd

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,6 @@ title: "NetworkX - Graph Models"
33
format: html
44
---
55

6-
# NetworkX - Graph Models
7-
8-
_The contents of this notebook have been derived from "A First Course in Network Science" by Filippo Menczer. [You can see their official Github repository here.](https://github.com/CambridgeUniversityPress/FirstCourseNetworkScience/tree/master)_
9-
10-
Contents:
11-
12-
1. [Random network model](#1.-Random-Network-Model)
13-
2. [Small-World model](#2.-Small-World-Model)
14-
3. [Preferential attachment model](#3.-Preferential-Attachment-Model)
15-
166
For each of the models presented in this tutorial, we present the algorithm, and the corresponding NetworkX code function to generate the model.
177

188
**Note:** This notebook assumes you know the basics of Network X, that were shown in the "fundamentals" notebook. It will also use concepts from the "structural properties" notebook.
@@ -22,7 +12,7 @@ import matplotlib.pyplot as plt
2212
import networkx as nx
2313
```
2414

25-
## 1. Random Network Model
15+
## Random Network Model
2616

2717
The random network model, as formulated by Gilbert, has two parameters: the number of nodes $N$, and the link probability $p$. As in the book text, the algorithm for creating this network is as follows:
2818

@@ -70,7 +60,7 @@ plt.ylabel("Number of nodes")
7060
plt.show()
7161
```
7262

73-
### Erdös-Rényi random graph model
63+
### Erdos-Renyi random graph model
7464

7565
Instead of specifying the link probability $p$, we can also generate a graph of $N$ nodes with exactly $M$ edges by using `random.sample()` to choose M of the possible edges generated with `itertools.combinations()`:
7666

@@ -115,7 +105,7 @@ plt.show()
115105

116106
---
117107

118-
## 2. Small-World Model
108+
## Small-World Model
119109

120110
The algorithm for generating a small-world network is as such:
121111

@@ -161,7 +151,7 @@ plt.show()
161151

162152
---
163153

164-
## 3. Preferential Attachment Model
154+
## Preferential Attachment Model
165155

166156
The Barabási-Albert preferential attachment model has two parameters: the number of nodes $N$, and the number of links added at each step $m$. Given these parameters, the algorithm is as follows:
167157

@@ -195,6 +185,7 @@ plt.show()
195185
```
196186

197187
---
188+
198189
## What's Next?
199190

200191
Ready to simulate epidemics? Continue to:

0 commit comments

Comments
 (0)