Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize docs #525

Merged
merged 36 commits into from
Nov 6, 2020
Merged
Show file tree
Hide file tree
Changes from 28 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
8e02523
Standardized first half of tutorials
pauladkisson Sep 27, 2020
df98327
Merge branch 'dev' of https://github.com/microsoft/graspologic into s…
pauladkisson Oct 9, 2020
db92dc8
updating repo to match upstream
pauladkisson Oct 9, 2020
e966a9c
Suppressing graph messages up to latent_position_test
pauladkisson Oct 9, 2020
82e1004
finished standardizing tutorials
pauladkisson Oct 9, 2020
ee74af6
standardize simulations
pauladkisson Oct 9, 2020
2b4c2d0
second standardize of simulations
pauladkisson Oct 9, 2020
b90329f
standardize models
pauladkisson Oct 9, 2020
1bb525b
standardize embed
pauladkisson Oct 9, 2020
5c10a99
standardize cluster
pauladkisson Oct 10, 2020
2de63ed
standardize inference
pauladkisson Oct 10, 2020
8774550
standardize plot
pauladkisson Oct 10, 2020
347ca52
standardize datasets
pauladkisson Oct 10, 2020
11d33e1
standardize utility
pauladkisson Oct 10, 2020
c395f42
standardize pipeline
pauladkisson Oct 10, 2020
3215add
standardize matching
pauladkisson Oct 11, 2020
1b2ae50
standardize subgraph
pauladkisson Oct 11, 2020
c2300db
standardize align
pauladkisson Oct 11, 2020
ec91d74
blackened repo
pauladkisson Oct 11, 2020
af23a2f
Merge branch 'dev' into standardize-docs
bdpedigo Oct 15, 2020
dcdbf9b
fixing the version.txt file
pauladkisson Oct 16, 2020
f3d2a14
Merge branch 'dev' of https://github.com/microsoft/graspologic into s…
pauladkisson Oct 16, 2020
369de27
Merge branch 'standardize-docs' of https://github.com/pauladkisson/gr…
pauladkisson Oct 16, 2020
44fb71b
responding to feedback
pauladkisson Oct 21, 2020
f1bba0e
Correcting version to 3.7.0
pauladkisson Oct 26, 2020
aafda03
Merge branch 'dev' of https://github.com/microsoft/graspologic into s…
pauladkisson Oct 26, 2020
0f4850c
Merge branch 'dev' into standardize-docs
bdpedigo Oct 27, 2020
426376e
Merge branch 'dev' into standardize-docs
bdpedigo Oct 30, 2020
858dc78
Changing to _ = to suppress graph summary output
pauladkisson Nov 3, 2020
c9bffac
Merge branch 'dev' of https://github.com/microsoft/graspologic into s…
pauladkisson Nov 3, 2020
db82b94
Merge branch 'standardize-docs' of https://github.com/pauladkisson/gr…
pauladkisson Nov 3, 2020
6cb4267
Blackened repo
pauladkisson Nov 3, 2020
e9f2b0c
Final check of netlify build
pauladkisson Nov 4, 2020
8915c4a
correcting minor typos
pauladkisson Nov 4, 2020
db49d01
correcting one last typo
pauladkisson Nov 4, 2020
facdcc3
Merge branch 'dev' into standardize-docs
bdpedigo Nov 6, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docs/tutorials/embedding/AdjacencySpectralEmbed.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@
"undirected_sbm = sbm(2 * [n_verts], P)\n",
"heatmap(undirected_sbm, title='2-block SBM (undirected)', inner_hier_labels=labels_sbm)\n",
"directed_sbm = sbm(2 * [n_verts], P, directed=True)\n",
"heatmap(directed_sbm, title='2-block SBM (directed)', inner_hier_labels=labels_sbm)"
"heatmap(directed_sbm, title='2-block SBM (directed)', inner_hier_labels=labels_sbm);"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"We can use the AdjacencySpectralEmbed class to embed the adjacency matrix as follows. If no parameters are given to the AdjacencySpectralEmbed class, it will automatically choose the number of dimensions to embed into."
"We can use the ``AdjacencySpectralEmbed`` class to embed the adjacency matrix as follows. If no parameters are given to the AdjacencySpectralEmbed class, it will automatically choose the number of dimensions to embed into."
]
},
{
Expand All @@ -64,7 +64,7 @@
"source": [
"ase = AdjacencySpectralEmbed()\n",
"Xhat = ase.fit_transform(undirected_sbm)\n",
"pairplot(Xhat, title='SBM adjacency spectral embedding')"
"pairplot(Xhat, title='SBM adjacency spectral embedding');"
]
},
{
Expand All @@ -83,7 +83,7 @@
"ase = AdjacencySpectralEmbed()\n",
"Xhat, Yhat = ase.fit_transform(directed_sbm)\n",
"pairplot(Xhat, title='SBM adjacency spectral embedding \"out\"')\n",
"pairplot(Yhat, title='SBM adjacency spectral embedding \"in\"')"
"pairplot(Yhat, title='SBM adjacency spectral embedding \"in\"');"
]
},
{
Expand All @@ -101,7 +101,7 @@
"source": [
"ase = AdjacencySpectralEmbed(n_components=2, algorithm='truncated')\n",
"Xhat = ase.fit_transform(undirected_sbm)\n",
"pairplot(Xhat, title='2-component embedding', height=4)"
"pairplot(Xhat, title='2-component embedding', height=4);"
]
},
{
Expand Down
10 changes: 5 additions & 5 deletions docs/tutorials/embedding/Omnibus.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@
"\n",
"\\begin{align*}\n",
"P_1 = \n",
"\\begin{bmatrix}0.2 & 0.1\\\\\n",
"\\begin{bmatrix}0.3 & 0.1\\\\\n",
"0.1 & 0.7\n",
"\\end{bmatrix},~\n",
"P_2 = \\begin{bmatrix}0.2 & 0.1\\\\\n",
"0.1 & 0.2\n",
"P_2 = \\begin{bmatrix}0.3 & 0.1\\\\\n",
"0.1 & 0.3\n",
"\\end{bmatrix}\n",
"\\end{align*}\n",
"\n",
Expand Down Expand Up @@ -82,7 +82,7 @@
"from graspologic.plot import heatmap\n",
"\n",
"heatmap(G1, figsize=(7, 7), title='Visualization of Graph 1')\n",
"heatmap(G2, figsize=(7, 7), title='Visualization of Graph 2')"
"heatmap(G2, figsize=(7, 7), title='Visualization of Graph 2');"
]
},
{
Expand Down Expand Up @@ -152,7 +152,7 @@
"for i in range(50):\n",
" ax.plot([Xhat1[i, 0], Xhat2[i, 0]], [Xhat1[i, 1], Xhat2[i, 1]], 'black', alpha = 0.15)\n",
" \n",
"ax.set_title('Latent Positions from Omnibus Embedding', fontsize=20)"
"ax.set_title('Latent Positions from Omnibus Embedding', fontsize=20);"
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/inference/latent_distribution_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
"A1 = sbm(csize, P)\n",
"X1 = AdjacencySpectralEmbed(n_components=n_components).fit_transform(A1)\n",
"heatmap(A1, title='2-block SBM adjacency matrix')\n",
"pairplot(X1, title='2-block adjacency spectral embedding', height=4.5)"
"pairplot(X1, title='2-block adjacency spectral embedding', height=4.5);"
]
},
{
Expand All @@ -72,7 +72,7 @@
"A1 = sbm(csize, P)\n",
"X1 = AdjacencySpectralEmbed(n_components=n_components).fit_transform(A1)\n",
"heatmap(A2, title='2-block SBM adjacency matrix')\n",
"pairplot(X2, title='2-block adjacency spectral embedding', height=4.5)"
"pairplot(X2, title='2-block adjacency spectral embedding', height=4.5);"
]
},
{
Expand Down Expand Up @@ -175,7 +175,7 @@
"A3 = sbm(csize, P2)\n",
"heatmap(A3, title='2-block SBM adjacency matrix A3')\n",
"X3 = AdjacencySpectralEmbed(n_components=n_components).fit_transform(A3)\n",
"pairplot(X3, title='2-block adjacency spectral embedding A3', height=4.5)"
"pairplot(X3, title='2-block adjacency spectral embedding A3', height=4.5);"
]
},
{
Expand Down
16 changes: 8 additions & 8 deletions docs/tutorials/inference/latent_position_test.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,18 @@
"A = sbm(csize, P)\n",
"X = AdjacencySpectralEmbed(n_components=n_components).fit_transform(A)\n",
"heatmap(A, title='4-block SBM adjacency matrix')\n",
"pairplot(X, title='4-block adjacency spectral embedding')"
"pairplot(X, title='4-block adjacency spectral embedding');"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"In the adjacency matrix above, there is a clearly defined block structrure corresponding to the 4 communities in the graph that we established. On the right, we see the **adjacency spectral embedding (ASE)** of this graph. ASE(A) recovers an estimate of the **latent positions** of $A $. Latent positions refer to the idea of a **random dot product graph (RDPG)** which can be modeled as follows:\n",
"In the adjacency matrix above, there is a clearly defined block structrure corresponding to the 4 communities in the graph that we established. On the right, we see the **adjacency spectral embedding (ASE)** of this graph. $\\text{ASE}(A)$ recovers an estimate of the **latent positions** of $A$. Latent positions refer to the idea of a **random dot product graph (RDPG)** which can be modeled as follows:\n",
"\n",
"For an adjacency matrix $A \\in \\mathbb{R}^{n x n}$, the probability of an edge existing between node $i$ and node $j$ (aka whether or not $A_{ij}$ is a 1) is determined by the matrix $P \\in \\mathbb{R}^{n x n}$\n",
"For an adjacency matrix $A \\in \\mathbb{R}^{n \\times n}$, the probability of an edge existing between node $i$ and node $j$ (aka whether or not $A_{ij}$ is a 1) is determined by the matrix $P \\in \\mathbb{R}^{n \\times n}$\n",
"\n",
"$P = XX^T$, where $X \\in \\mathbb{R}^{n x d} $ and is referred to as the latent positions of the graph. $X$ is referred to as the latent positions of the graph because each node $n_i$ is modeled as having a hidden, usually unobserved location in $\\mathbb{R}^d$ (we'll call it $x_i$). The probability of an edge existing between $n_i$ and $n_j$ is equal to the dot product $x_i \\cdot x_j$\n",
"$P = XX^T$, where $X \\in \\mathbb{R}^{n \\times d}$ and is referred to as the latent positions of the graph. $X$ is referred to as the latent positions of the graph because each node $n_i$ is modeled as having a hidden, usually unobserved location in $\\mathbb{R}^d$ (we'll call it $x_i$). The probability of an edge existing between $n_i$ and $n_j$ is equal to the dot product $x_i \\cdot x_j$\n",
"\n",
"ASE is one way to obtain an estimate of the latent positions of a graph, $\\hat{X}$\n",
"\n",
Expand All @@ -73,7 +73,7 @@
"metadata": {},
"source": [
"## Sample new RDPGs from this latent position\n",
"Given the estimate of X, we now sample two new RDPGs from the same latent position above"
"Given the estimate of $X$, we now sample two new RDPGs from the same latent position above"
]
},
{
Expand All @@ -97,7 +97,7 @@
"heatmap(A1, title='Sampled RDPG 1 adjacency matrix')\n",
"heatmap(A2, title='Sampled RDPG 2 adjacency matrix')\n",
"pairplot(Xhat1, title='Sampled RDPG 1 adjacency spectral embedding')\n",
"pairplot(Xhat2, title='Sampled RDPG 2 adjacency spectral embedding')"
"pairplot(Xhat2, title='Sampled RDPG 2 adjacency spectral embedding');"
]
},
{
Expand All @@ -120,7 +120,7 @@
"\n",
"Here, R is an orthogonal rotation matrix found from solving the [orthogonal procrustes problem](https://docs.scipy.org/doc/scipy-0.18.1/reference/generated/scipy.linalg.orthogonal_procrustes.html) (Note: this constraint can be relaxed for other versions of semipar)\n",
"\n",
"Note that LatentPositionTest.fit() may take several minutes"
"Note that ``LatentPositionTest.fit()`` may take several minutes"
]
},
{
Expand Down Expand Up @@ -177,7 +177,7 @@
"heatmap(A3, title='Sampled RDPG 3 adjacency matrix')\n",
"heatmap(A4, title='Sampled RDPG 4 (distorted) adjacency matrix')\n",
"pairplot(Xhat3, title='Sampled RDPG 3 adjacency spectral embedding')\n",
"pairplot(Xhat4, title='Sampled RDPG 4 (distorted) adjacency spectral embedding')"
"pairplot(Xhat4, title='Sampled RDPG 4 (distorted) adjacency spectral embedding');"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/matching/faq.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"\n",
"\\begin{equation}\n",
"\\begin{aligned}\n",
"\\min & {\\;-trace(APB^T P^T)}\\\\\n",
"\\min & {\\;-\\text{trace}(APB^T P^T)}\\\\\n",
"\\text{s.t. } & {\\;P \\: \\epsilon \\: \\mathcal{P}} \\\\\n",
"\\end{aligned}\n",
"\\end{equation}\n",
Expand All @@ -44,7 +44,7 @@
"\n",
"\\begin{equation}\n",
"\\begin{aligned}\n",
"\\min & {\\; trace(APB^T P^T)}\\\\\n",
"\\min & {\\; \\text{trace}(APB^T P^T)}\\\\\n",
"\\text{s.t. } & {\\;P \\: \\epsilon \\: \\mathcal{P}} \\\\\n",
"\\end{aligned}\n",
"\\end{equation}\n",
Expand Down Expand Up @@ -110,7 +110,7 @@
"source": [
"from graspologic.plot import heatmap\n",
"heatmap(G1, cbar=False, title = 'G1 [ER-NP(50, 0.3) Simulation]')\n",
"heatmap(G2, cbar=False, title = 'G2 [G1 Randomly Shuffled]')"
"heatmap(G2, cbar=False, title = 'G2 [G1 Randomly Shuffled]');"
]
},
{
Expand Down Expand Up @@ -141,7 +141,7 @@
"outputs": [],
"source": [
"heatmap(G1, cbar=False, title = 'G1[ER-NP(50, 0.3) Simulation]')\n",
"heatmap(G2, cbar=False, title = 'G2[ER-NP(50, 0.3) Randomly Shuffled] unshuffled')"
"heatmap(G2, cbar=False, title = 'G2[ER-NP(50, 0.3) Randomly Shuffled] unshuffled');"
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/matching/sgm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"fig, axs = plt.subplots(1, 3, figsize=(10, 5))\n",
"heatmap(A1, ax=axs[0], cbar=False, title=\"Graph 1\")\n",
"heatmap(A2, ax=axs[1], cbar=False, title=\"Graph 2\")\n",
"heatmap(A1 - A2, ax=axs[2], cbar=False, title=\"Diff (G1 - G2)\")"
"heatmap(A1 - A2, ax=axs[2], cbar=False, title=\"Diff (G1 - G2)\");"
]
},
{
Expand Down Expand Up @@ -116,7 +116,7 @@
"fig, axs = plt.subplots(1, 3, figsize=(10, 5))\n",
"heatmap(A1, ax=axs[0], cbar=False, title=\"Graph 1\")\n",
"heatmap(A2_shuffle, ax=axs[1], cbar=False, title=\"Graph 2 shuffled\")\n",
"heatmap(A1 - A2_shuffle, ax=axs[2], cbar=False, title=\"Diff (G1 - G2 shuffled)\")\n"
"heatmap(A1 - A2_shuffle, ax=axs[2], cbar=False, title=\"Diff (G1 - G2 shuffled)\");"
]
},
{
Expand Down Expand Up @@ -181,7 +181,7 @@
"heatmap(A1 - A2_unshuffle, ax=axs[2], cbar=False, title=\"Diff (G1 - G2 unshuffled)\")\n",
"\n",
"match_ratio = 1-(np.count_nonzero(abs(sgm.perm_inds_-node_unshuffle_input))/n_verts)\n",
"print(\"Match Ratio with 10 seeds: \", match_ratio)\n"
"print(\"Match Ratio with 10 seeds: \", match_ratio)"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion docs/tutorials/models/models.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@
" pad=0.04,\n",
" shrink=0.8,\n",
" fraction=0.08,\n",
" drawedges=False)"
" drawedges=False);"
]
}
],
Expand Down
11 changes: 2 additions & 9 deletions docs/tutorials/simulations/corr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"source": [
"from graspologic.plot import heatmap\n",
"heatmap(G1, title = 'Correlated ER Simulation Graph 1')\n",
"heatmap(G2, title = 'Correlated ER Simulation Graph 2')"
"heatmap(G2, title = 'Correlated ER Simulation Graph 2');"
]
},
{
Expand Down Expand Up @@ -147,15 +147,8 @@
"outputs": [],
"source": [
"heatmap(G1, title = 'Correlated SBM Simulation Graph 1')\n",
"heatmap(G2, title = 'Correlated SBM Simulation Graph 2')"
"heatmap(G2, title = 'Correlated SBM Simulation Graph 2');"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/simulations/erdos_renyi.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"from graspologic.plot import heatmap\n",
"\n",
"heatmap(G1, title = 'ER-NP(50, 0.3) Simulation')\n",
"heatmap(G2, title = 'ER-NM(50, 250) Simulation')"
"heatmap(G2, title = 'ER-NM(50, 250) Simulation');"
]
},
{
Expand All @@ -74,7 +74,7 @@
"source": [
"## Weighted ER Graphs\n",
"\n",
"Both *er_np* and *er_nm* functions provide ways to sample weights for all edges that were sampled via a probability distribution function. In order to sample with weights, we provide a probability distribution function with corresponding keyword arguments for the distribution function.\n",
"Both ``er_np()`` and ``er_nm()`` functions provide ways to sample weights for all edges that were sampled via a probability distribution function. In order to sample with weights, we provide a probability distribution function with corresponding keyword arguments for the distribution function.\n",
"\n",
"Below we sample $G_1 \\sim ER_{NP}(50, 0.2)$ where the weights are distributed normally with $\\mu = 0,~\\sigma^2 = 1$."
]
Expand Down Expand Up @@ -104,7 +104,7 @@
"metadata": {},
"outputs": [],
"source": [
"heatmap(G1, title = 'ER-NP(50, 0.2) with N(0,1) Weights Simulation')"
"heatmap(G1, title = 'ER-NP(50, 0.2) with N(0,1) Weights Simulation');"
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/simulations/rdpg.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
"source": [
"from graspologic.plot import heatmap\n",
"\n",
"heatmap(A, title='ER_NP(100, 0.5) Using RDPG')"
"heatmap(A, title='ER_NP(100, 0.5) Using RDPG');"
]
},
{
Expand Down Expand Up @@ -109,7 +109,7 @@
"source": [
"X = np.array([[0.5, 0.2, 0.2]] * 50 + [[0.1, 0.1, 0.1]] * 50)\n",
"A_rdpg = rdpg(X, loops=False)\n",
"heatmap(A_rdpg, title='2-block SBM as RDPG')"
"heatmap(A_rdpg, title='2-block SBM as RDPG');"
]
},
{
Expand All @@ -131,7 +131,7 @@
"p = [[0.33, 0.09], [0.09, 0.03]]\n",
"\n",
"A_sbm = sbm(n, p)\n",
"heatmap(A_sbm, title = 'SBM Simulation')"
"heatmap(A_sbm, title = 'SBM Simulation');"
]
}
],
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/simulations/rdpg_corr.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"\n",
"Here, we want to generate a pair of graphs with the same latent positions but with correlation between edges. \n",
"\n",
"There are several parameters in this function: \"X\" and \"Y\" are the input matrices (latent positions) which are used to generate the probability matrix; \"r\" is the correlation between the graph pair, which should be (-1,1) (note that not all values of r may be possible for a given set of latent positions).\n",
"There are several parameters in this function: $X$ and $Y$ are the input matrices (latent positions) which are used to generate the probability matrix; $r$ is the correlation between the graph pair, which should be (-1,1) (note that not all values of r may be possible for a given set of latent positions).\n",
"\n",
"Below, we sample a RDPG graph pair (undirected and no self-loops), G1 and G2, with the following parameters:\n",
"\\begin{align*}\n",
Expand Down Expand Up @@ -66,7 +66,7 @@
"metadata": {},
"source": [
"## Visualize the graphs using heatmap\n",
"Here, we define \"difference rate\" to be the number of edges between the two graphs which are not the same (exist or not exist) out of all potential edges (roughly $n^2$)"
"Here, we define *difference rate* to be the number of edges between the two graphs which are not the same (exist or not exist) out of all potential edges (roughly $n^2$)"
]
},
{
Expand Down Expand Up @@ -265,7 +265,7 @@
"x_list = np.linspace(-0.5,0.9,15)\n",
"plt.plot(x_list,rlist,'o-')\n",
"plt.xlabel(\"Correlation\")\n",
"plt.ylabel('Difference rate')"
"plt.ylabel('Difference rate');"
]
},
{
Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/simulations/sbm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Unlike [Erdos-Renyi (ER) models](./erdos_renyi.ipynb), a Stochastic Block Model (SBM) produces graphs containing communities: disjoint subgraphs characterized by differing edge probabilities for vertices within and between communities<sup>[1](https://en.wikipedia.org/wiki/Stochastic_block_model)</sup>.\n",
"Unlike [Erdos-Renyi (ER) models](./erdos_renyi.ipynb), a Stochastic Block Model (SBM) produces graphs containing communities: disjoint subgraphs characterized by differing edge probabilities for vertices within and between communities [(1)](https://en.wikipedia.org/wiki/Stochastic_block_model).\n",
"\n",
"SBM is parametrized by the number of vertices in each community $n$, and a block probability matrix $P \\in \\mathbb{R}^{n x n}$ where each element specifies the probability of an edge in a particular block. One can think of SBM as a collection of ER graphs where each block corresponds to an ER graph.\n",
"\n",
Expand Down Expand Up @@ -72,7 +72,7 @@
"source": [
"from graspologic.plot import heatmap\n",
"\n",
"heatmap(G, title ='SBM Simulation')"
"heatmap(G, title ='SBM Simulation');"
]
},
{
Expand All @@ -81,7 +81,7 @@
"source": [
"## Weighted SBM Graphs\n",
"\n",
"Similar to ER simulations, *sbm* functions provide ways to sample weights for all edges that were sampled via a probability distribution function. In order to sample with weights, you can either:\n",
"Similar to ER simulations, ``sbm()`` functions provide ways to sample weights for all edges that were sampled via a probability distribution function. In order to sample with weights, you can either:\n",
"\n",
"1. Provide a *single* probability distribution function with corresponding keyword arguments for the distribution function. All weights will be sampled using the same function.\n",
"2. Provide a probability distribution function with corresponding keyword arguments for each block.\n",
Expand Down Expand Up @@ -139,7 +139,7 @@
"metadata": {},
"outputs": [],
"source": [
"heatmap(G, title='Weighted SBM Simulation')"
"heatmap(G, title='Weighted SBM Simulation');"
]
}
],
Expand Down
Loading