Toy example / Algorithm

Author

SEOYEON CHOI

Published

March 12, 2024

https://www.researchgate.net/profile/Liang-Liu-42/publication/339714816_Regression_multiple_imputation_for_missing_data_analysis/links/607f43e32fb9097c0cf91255/Regression-multiple-imputation-for-missing-data-analysis.pdf

https://arxiv.org/pdf/1511.03512.pdf

https://citeseerx.ist.psu.edu/document?repid=rep1&type=pdf&doi=576cd01f8e2c289651ae0a86374ac6d6abb787c1


Model Node_feature Edge Index Edge Weight Edge Type
GConvGRU O, Node features O O X
GConvLSTM O, Node features O O X
GCLSTM O, Node features O O X
LRGCN O, Node features O O O
DyGrEncoder O, Node features O O X
EvolveGCNH O, Node embedding O O X
EvolveGCNO O, Node embedding O O X
TGCN O, Node features O O X
DCRNN O, Node features O O X

Define Spatio Temporal Graph data

Notations Definitions or Description
\({\cal G}\) Input Graph
\(T\) the length of the time interval
\(\cal{V}\) a set of Verteces
\(V\) a set of an index node
\(N\) the number of Verteces
\(\cal{E}\) a set of undirected Edges
\(\textbf{y}\) a graph signal, a function defined on the vertices of the graph \(\cal{G}\)
\(\textbf{W}\) a weighted adjacency matrix

Define Complete Data

  1. Define \({\cal Y} = ({\cal O} , {\cal M})\)
  1. Conduct the linear interpolation and Update \({\cal M}\) by \(\tilde{{\cal Y}} = ( {\cal O} , \tilde{ {\cal M} } )\)

Repeat steps Laplacian, Eigenvalue Decomposition, Graph Fourier Transform, Ebayes Thresholding, Inverse Graph Fourier Transform, respectively

  1. Define nomalized Laplacian matrix \(\textbf{L}\) from graph shift operator \(W\).
  1. Calculate Eigenvalue Decomposition
  1. Apply Graph Fourier Transform
  1. Estimate power of \(\bar{\textbf{Y}}\)
  1. Get \(\hat{\textbf{p}}_{tr}\) by thresholding \(\hat{p}\) with ebayes thresholding
  1. Calculate \(\hat{\textbf{Y}}_{tr}\) from Inverse Graph Fourier Transform
  1. Learn STGCN with \(\hat{{\cal Y}}\), and Get \(\hat{{\cal Y}}_{stgcn}\)
  1. Repeat every steps

Calculate MSE

Caculate MSE = \(\frac{1}{NT} \sum^N_{v=1} \sum^T_{t=1} (y_{v,t} - (\hat{y}_{v,t})^{(L)}) ^2\)


Algorithm 1: GFT, EbayesThresh and STGCN

Input \(\tilde{\cal{Y}} = ( {\cal O} , \tilde{ {\cal M} } )\)(\(={\tilde{\textbf Y}}\))

Output \(\hat{{\cal Y}}^{(L)}\)

for \(l\) =1, \({\cal L} :=\{ 1,2,\cdots , L\}\) do

Apply GFT \({\mathbf V}^H {\tilde {\textbf Y}} = \bar{\textbf{Y}}\)

\(\hat{p} \leftarrow \frac{1}{{\cal R}} \sum^{\cal R}_{r=1} |\bar{y}_r|^2\)

EbayesThresh \(\breve{\textbf{p}} \leftarrow \hat{\textbf{p}}\)

\({\breve {\textbf Y}} = \sqrt{\breve{\textbf{p}}}\)

Apply Inverse GFT \({\mathbf V} {\breve {\textbf Y}} = \breve{\textbf{Y}}_{tr}\)

\({\cal{\tilde{M}}} \leftarrow \breve{ {\cal M}_{tr} }\)

\(\bar{\cal{Y}} = ( {\cal O} , \breve{ {\cal M}_{tr} } )\)

\(\text{ STGCN } (\bar{\cal{Y}}) \leftarrow \bar{{\cal Y}}^{(l)}_{gcn}\)

\({\bar {\cal M} }^{(l)}_{gcn} \leftarrow \hat{ {\cal M} }\)

end for


Algorithm 2: Self Consistency

Input \(\hat{g}_{obs}(\cdot) = \tilde{\cal{Y}}\)

Output \(\hat{g}_{com}(\cdot) = {\cal \bar{Y}}^{(l)}\)

\(E(\bar{g}_{com} |{\cal O}; g = \bar{g}_{obs}) = \bar{g}_{obs}\)

\({\cal \bar{Y}}^{(l)} \leftarrow \tilde{\cal{Y}}\)


Algorithm 3: EbayesThresh

Input \(\hat{\textbf{p}}\)

Output \(\breve{\textbf{p}}\)

\(\hat{\textbf{p}} = \textbf{p}_{pp} + \textbf{p}_{ac}\)

\(\breve{\textbf{p}} \leftarrow \textbf{p}_{pp}\)


Toy Example

Define data

Graph \({\cal G} = (V, E,\)\(\textbf{W})\)

\(\textbf{W}_{10 \times 10} = \begin{bmatrix} 0 & 1 & 0 &0 & 0 & 0 &0 & 0 & 0 & 0 \\ 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0 &0&0 \\ 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 &0&0\\ 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 1\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \end{bmatrix}\)

Incomplete data

\({\cal y} = ( {\cal O}, {\cal M} )\), 노드 3개(0,1,2), 타임 10 \(\therefore 3 \times 10= 30\)

  1. Conduct the linear interpolation \(\bar{{\cal Y}} = ( {\cal O} , \tilde{ {\cal M} } )\)

Repeat

행렬 확인차 여기 예제에서만 기호 오른쪽 아래에 행 * 열 입력

그래프 라플라시안

고유값 분해

그래프 푸리에 변환

이베이즈

역 그래프 푸리에 변환

모델로 학습

epoch = 20 가정

\(\hat{{\cal Y}}^{(20)} = ({\cal O}, \hat{{\cal M}}^{(20)})\) 을 얻음

\(\hat{{\cal Y}}^{(20)} = ({\cal O}, \hat{{\cal M}}^{(20)})\) 를 이용해서 에러 구하기

MSE = \(\frac{1}{30} \sum^3_{v=1} \sum^{10}_{t=1} (y_{v,t_v} - (\hat{y}_{v,t_v})^{(20)}) ^2\)