Unverified Commit 5337d7b2 authored by Rhett Ying's avatar Rhett Ying Committed by GitHub
Browse files

[Doc] fix math and link display issue (#5212)

parent 20ce9be2
...@@ -71,7 +71,7 @@ ...@@ -71,7 +71,7 @@
"## Graph Convolutional Layer\n", "## Graph Convolutional Layer\n",
"\n", "\n",
"Mathematically, the graph convolutional layer is defined as:\n", "Mathematically, the graph convolutional layer is defined as:\n",
"$$f(X^{(l)}, A) = \\sigma(\\hat{D}^{-\\frac{1}{2}}\\hat{A}\\hat{D}^{-\\frac{1}{2}}X^{(l)}W^{(l)})$$\n", "$$f(X^{(l)}, A) = \\sigma(\\hat{D}^{-\\frac{1}{2}}\\hat{A}\\hat{D}^{-\\frac{1}{2}}X^{(l)}W^{(l)})$$",
"with $\\hat{A} = A + I$, where $A$ denotes the adjacency matrix and $I$ denotes the identity matrix, $\\hat{D}$ refers to the diagonal node degree matrix of $\\hat{A}$ and $W^{(l)}$ denotes a trainable weight matrix. $\\sigma$ refers to a non-linear activation (e.g. relu).\n", "with $\\hat{A} = A + I$, where $A$ denotes the adjacency matrix and $I$ denotes the identity matrix, $\\hat{D}$ refers to the diagonal node degree matrix of $\\hat{A}$ and $W^{(l)}$ denotes a trainable weight matrix. $\\sigma$ refers to a non-linear activation (e.g. relu).\n",
"\n", "\n",
"The code below shows how to implement it using the `dgl.sparse` package. The core operations are:\n", "The code below shows how to implement it using the `dgl.sparse` package. The core operations are:\n",
......
...@@ -134,9 +134,7 @@ ...@@ -134,9 +134,7 @@
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"We use the graph convolution matrix from Graph Convolution Networks as the diffusion matrix in this example. The graph convolution matrix is defined as:\n", "We use the graph convolution matrix from Graph Convolution Networks as the diffusion matrix in this example. The graph convolution matrix is defined as:\n",
"$$\n", "$$\\tilde{A} = \\hat{D}^{-\\frac{1}{2}}\\hat{A}\\hat{D}^{-\\frac{1}{2}}$$",
"\\tilde{A} = \\hat{D}^{-\\frac{1}{2}}\\hat{A}\\hat{D}^{-\\frac{1}{2}}\n",
"$$\n",
"with $\\hat{A} = A + I$, where $A$ denotes the adjacency matrix and $I$ denotes the identity matrix, $\\hat{D}$ refers to the diagonal node degree matrix of $\\hat{A}$." "with $\\hat{A} = A + I$, where $A$ denotes the adjacency matrix and $I$ denotes the identity matrix, $\\hat{D}$ refers to the diagonal node degree matrix of $\\hat{A}$."
], ],
"metadata": { "metadata": {
...@@ -5756,4 +5754,4 @@ ...@@ -5756,4 +5754,4 @@
} }
} }
] ]
} }
\ No newline at end of file
...@@ -186,11 +186,9 @@ ...@@ -186,11 +186,9 @@
"\n", "\n",
"## Hypergraph Neural Network (HGNN) Layer\n", "## Hypergraph Neural Network (HGNN) Layer\n",
"\n", "\n",
"The **[HGNN layer](https://arxiv.org/pdf/1809.09401.pdf)** is defined as:\n", "The [HGNN layer](https://arxiv.org/pdf/1809.09401.pdf) is defined as:\n",
"$$\n", "$$f(X^{(l)}, H; W^{(l)}) = \\sigma(L X^{(l)} W^{(l)})$$",
"f(X^{(l)}, H; W^{(l)}) = \\sigma(L X^{(l)} W^{(l)}) \\\\\n", "$$L = D_v^{-1/2} H B D_e^{-1} H^\\top D_v^{-1/2}$$",
"L = D_v^{-1/2} H B D_e^{-1} H^\\top D_v^{-1/2}\n",
"$$\n",
"where\n", "where\n",
"* $H \\in \\mathbb{R}^{N \\times M}$ is the incidence matrix of hypergraph with $N$ nodes and $M$ hyperedges.\n", "* $H \\in \\mathbb{R}^{N \\times M}$ is the incidence matrix of hypergraph with $N$ nodes and $M$ hyperedges.\n",
"* $D_v \\in \\mathbb{R}^{N \\times N}$ is a diagonal matrix representing node degrees, whose $i$-th diagonal element is $\\sum_{j=1}^M H_{ij}$.\n", "* $D_v \\in \\mathbb{R}^{N \\times N}$ is a diagonal matrix representing node degrees, whose $i$-th diagonal element is $\\sum_{j=1}^M H_{ij}$.\n",
...@@ -401,11 +399,11 @@ ...@@ -401,11 +399,11 @@
{ {
"cell_type": "markdown", "cell_type": "markdown",
"source": [ "source": [
"For the complete example of HGNN, please refer to https://github.com/dmlc/dgl/blob/master/examples/sparse/hgnn.py." "For the complete example of HGNN, please refer to [here](https://github.com/dmlc/dgl/blob/master/examples/sparse/hgnn.py)."
], ],
"metadata": { "metadata": {
"id": "59pCzjpBOyEW" "id": "59pCzjpBOyEW"
} }
} }
] ]
} }
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment