Skip to content

Commit

Permalink
usage: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeff committed Oct 18, 2016
1 parent 1014001 commit 983628b
Showing 1 changed file with 3 additions and 25 deletions.
28 changes: 3 additions & 25 deletions usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -18,24 +18,9 @@
"\n",
"From there, we'll structure our data with a graph $\\G = (\\V, \\E, A)$ where $\\V$ is the set of $d_x = |\\V|$ vertices, $\\E$ is the set of edges and $A \\in \\R^{d_x \\times d_x}$ is the adjacency matrix. That matrix represents the weight of each edge, i.e. $A_{i,j}$ is the weight of the edge connecting $v_i \\in \\V$ to $v_j \\in \\V$. The weights of that feature graph thus represent pairwise relationships between features $i$ and $j$. We call that regime **signal classification / regression**, as the samples $x_i$ to be classified or regressed are graph signals.\n",
"\n",
"Some applications of that regime:\n",
"* Task classification for task fMRI: the graph is a functional or anatomical connectome. Graph signals are activations measured by fMRI while the subject is performing some task. The goal is to find which task.\n",
"* Anomaly detection: given a transportation, energy or communication network and some traffic measures, predict whether something is going wrong.\n",
"* Text classification: each document is modeled as a graph signal (bag-of-words or TF-IDF) and each node represents a word. The graph represents the vocabulary, where edge weights indicate the similarity between words."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Other modelling possibilities include:\n",
"1. Using a data graph, i.e. an adjacency matrix $A \\in \\R^{n \\times n}$ which represents pairwise relationships between samples $x_i \\in \\R^{d_x}$. The problem is here to predict a graph signal $y \\in \\R^{n \\times d_y}$ given a graph characterized by $A$ and some graph signals $X \\in \\R^{n \\times d_x}$. We call that regime **node classification / regression**, as we classify or regress nodes instead of signals.\n",
" 1. Example application: text classification where each document is modeled as a node and each hyperlink or citation is an edge between them. The graph signals may be bag-of-words or TF-IDF representations of the documents.\n",
" 2. [Kipf & Weiling (2016)][kipf_weiling] uses a first-order approximation of our spectral graph convolution for semi-supervised node classification.\n",
"2. Another problem of interest is whole graph classification, with or without signals on top. We'll call that third regime **graph classification / regression**. The problem here is to classify or regress a whole graph $A_i \\in \\R^{n \\times n}$ (with or without an associated data matrix $X_i \\in \\R^{n \\times d_x}$) into $y_i \\in \\R^{d_y}$. In case we have no signal, we can use a constant vector $X_i = 1_n$ of size $n$.\n",
" 1. Example application: predict some characteristic of a chemical compound given its arrangement.\n",
"\n",
"[kipf_weiling]: https://arxiv.org/abs/1609.02907"
"2. Another problem of interest is whole graph classification, with or without signals on top. We'll call that third regime **graph classification / regression**. The problem here is to classify or regress a whole graph $A_i \\in \\R^{n \\times n}$ (with or without an associated data matrix $X_i \\in \\R^{n \\times d_x}$) into $y_i \\in \\R^{d_y}$. In case we have no signal, we can use a constant vector $X_i = 1_n$ of size $n$."
]
},
{
Expand All @@ -46,19 +31,12 @@
},
"outputs": [],
"source": [
"#import graph, coarsening, utils\n",
"import graph, coarsening, utils\n",
"%run -n models.ipynb # import models\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"import shutil\n",
"%matplotlib inline\n",
"\n",
"\n",
"%load_ext autoreload\n",
"%autoreload 1\n",
"%aimport graph\n",
"%aimport coarsening\n",
"%aimport utils"
"%matplotlib inline"
]
},
{
Expand Down

0 comments on commit 983628b

Please sign in to comment.