You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ PySGN can be installed using pip:
15
15
pip install pysgn
16
16
```
17
17
18
-
If you plan to run the Getting Started notebook `docs/getting_started.ipynb`(or build the documentation) locally, install the optional `docs` extras to get the other dependencies such as Jupyter and Sphinx:
18
+
If you plan to run the code snippets below or the Getting Started notebook `docs/getting_started.ipynb` locally, install the optional `docs` extras to get the other dependencies such as geodatasets, Jupyter and Sphinx:
19
19
20
20
```bash
21
21
pip install "pysgn[docs]"
@@ -34,11 +34,17 @@ pip install -e ".[docs]"
34
34
Here's a simple example of how to use the `geo_erdos_renyi_network` function to create a geospatial Erdős-Rényi network. It generates a network where each pair of nodes is connected with probability `p`, which depends on the spatial distance between the nodes. The parameter `a` controls the rate of decay of the connection probability with distance.
@@ -53,11 +59,16 @@ print(f"Number of edges: {graph.number_of_edges()}")
53
59
Similarly you can use the `geo_watts_strogatz_network` function to create a geospatial Watts-Strogatz network. It first creates a network where each node is connected to its `k` nearest neighbors. Then, it rewires each edge with probability `p`. If an edge is chosen to be rewired, it is replaced with a new edge to a random node, where the probability of connecting to this new node is inversely proportional to the spatial distance.
@@ -77,12 +88,17 @@ print(f"Number of edges: {graph.number_of_edges()}")
77
88
You can also use the `geo_barabasi_albert_network` function to create a geospatial Barabási-Albert network. It creates a network using geospatial preferential attachment, where the probability of connecting to existing nodes depends on both their degrees and the spatial distances.
Copy file name to clipboardExpand all lines: docs/index.md
+23-7Lines changed: 23 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ PySGN can be installed using pip:
15
15
pip install pysgn
16
16
```
17
17
18
-
If you plan to run the Getting Started notebook `docs/getting_started.ipynb`(or build the documentation) locally, install the optional `docs` extras to get the other dependencies such as Jupyter and Sphinx:
18
+
If you plan to run the code snippets below or the Getting Started notebook `docs/getting_started.ipynb` locally, install the optional `docs` extras to get the other dependencies such as geodatasets, Jupyter and Sphinx:
19
19
20
20
```bash
21
21
pip install "pysgn[docs]"
@@ -34,11 +34,17 @@ pip install -e ".[docs]"
34
34
Here's a simple example of how to use the `geo_erdos_renyi_network` function to create a geospatial Erdős-Rényi network. It generates a network where each pair of nodes is connected with probability `p`, which depends on the spatial distance between the nodes. The parameter `a` controls the rate of decay of the connection probability with distance.
@@ -53,11 +59,16 @@ print(f"Number of edges: {graph.number_of_edges()}")
53
59
Similarly you can use the `geo_watts_strogatz_network` function to create a geospatial Watts-Strogatz network. It first creates a network where each node is connected to its `k` nearest neighbors. Then, it rewires each edge with probability `p`. If an edge is chosen to be rewired, it is replaced with a new edge to a random node, where the probability of connecting to this new node is inversely proportional to the spatial distance.
@@ -77,12 +88,17 @@ print(f"Number of edges: {graph.number_of_edges()}")
77
88
You can also use the `geo_barabasi_albert_network` function to create a geospatial Barabási-Albert network. It creates a network using geospatial preferential attachment, where the probability of connecting to existing nodes depends on both their degrees and the spatial distances.
0 commit comments