RegularizedLaplacian {invertiforms}R 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 \times n graph adjacency matrix A as

L^\tau(A)_{ij} = \frac{A_{ij}}{\sqrt{d^{out}_i + \tau_{row}} \sqrt{d^{in}_j + \tau_{col}}}

where

d^{out}_i = \sum_{j=1}^n \| A_{ij} \|

and

d^{in}_j = \sum_{i=1}^n \| 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 \tau_{row} is an additive out-degree regularizer and \tau_{col} is an additive in-degree regularizer.

Note that this documentation renders more clearly at https://rohelab.github.io/invertiforms/.

Value

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)


[Package invertiforms version 0.1.1 Index]