RegularizedLaplacian: Construct and use the Regularized Laplacian

View source: R/RegularizedLaplacian.R

RegularizedLaplacianR Documentation

Construct and use the Regularized Laplacian

Description

Construct and use the Regularized Laplacian

Usage

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)

Arguments

A

A matrix to transform.

tau_row

Additive regularizer for row sums of abs(A). Typically this corresponds to inflating the (absolute) out-degree of each node by tau_row. Defaults to NULL, in which case we set tau_row to the mean (absolute) row sum of A.

tau_col

Additive regularizer for column sums of abs(A). Typically this corresponds to inflating the (absolute) in-degree of each node by tau_col. Defaults to NULL, in which case we set tau_col to the mean (absolute) column sum of A.

iform

An Invertiform object describing the transformation.

Details

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/.

Value

  • 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.

Examples


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)


invertiforms documentation built on Nov. 25, 2022, 5:05 p.m.