Skip to main content
. Author manuscript; available in PMC: 2021 Mar 14.
Published in final edited form as: Proc SIAM Int Conf Data Min. 2020;2020:316–324. doi: 10.1137/1.9781611976236.36

Algorithm A.2.

function GaussKernelGraph (X,ϵ)={W,D,}

Apply a Gaussian kernel to a dataset and compute the corresponding graph matrices.

Input: Dataset X={x1,,xN:xχ}d
Bandwidth function σ:X
Output: Kernel matrix W
Degree matrix D
Normalized Laplacian
  1: for i = 1, N do
  2: D(i, j) ← 0
  3: for j = 1, N do
  4:   W(i,j)12(exp(xixj222ϵ(xi))+exp(xixj222ϵ(xj))) Symmetric kernel
  5:   D(i, i) ← D(i, i) + W(i, j) Degrees
  6: end for
  7: end for
  8: ID1/2WD1/2 Normalized graph Laplacian
  9: return {W,D,}