View source: R/RegularizedLaplacian.R
RegularizedLaplacian | R Documentation |
Construct and use the Regularized Laplacian
RegularizedLaplacian(A, tau_row = NULL, tau_col = NULL) ## S4 method for signature 'RegularizedLaplacian,Matrix' transform(iform, A) ## S4 method for signature 'RegularizedLaplacian,matrix' transform(iform, A) ## S4 method for signature 'RegularizedLaplacian,sparseLRMatrix' transform(iform, A) ## S4 method for signature 'RegularizedLaplacian,Matrix' inverse_transform(iform, A) ## S4 method for signature 'RegularizedLaplacian,matrix' inverse_transform(iform, A) ## S4 method for signature 'RegularizedLaplacian,vsp_fa' inverse_transform(iform, A)
A |
A matrix to transform. |
tau_row |
Additive regularizer for row sums of |
tau_col |
Additive regularizer for column sums of |
iform |
An Invertiform object describing the transformation. |
We define the regularized Laplacian L_tau(A) of an n by n graph adjacency matrix A as
L[ij] = A[ij] / (sqrt(d^out[i] + τ_row) sqrt(d^in[j] + τ_col))
where
d^out[i] = sum_j abs(A[ij])
and
d^in[j] = sum_i abs(A[ij]).
When A[ij] denotes the present of an edge from node i to node j, which is fairly standard notation, d^out[i] denotes the (absolute) out-degree of node i and d^in[j] denotes the (absolute) in-degree of node j. Then τ_row is an additive out-degree regularizer and τ_col is an additive in-degree regularizer.
Note that this documentation renders more clearly at https://rohelab.github.io/invertiforms/.
RegularizedLaplacian()
creates a RegularizedLaplacian object.
transform()
returns the transformed matrix,
typically as a Matrix.
inverse_transform()
returns the inverse transformed matrix,
typically as a Matrix.
library(igraph) library(igraphdata) data("karate", package = "igraphdata") A <- get.adjacency(karate) iform <- RegularizedLaplacian(A) L <- transform(iform, A) L A_recovered <- inverse_transform(iform, L) all.equal(A, A_recovered)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.