Learn R Programming

NetPreProc (version 1.2)

Laplacian.norm-methods: Laplacian graph normalization

Description

Methods to normalize weights of square symmetric adjacency matrices. A network matrix is normalized by dividing each entry \(W_{ij}\) by the square root of the product of the sum of elements of row \(i\) and the sum of the elemnts in column \(j\). In other words if \(D\) is a diagonal matrix such that \(D_{ii} = \sum_j W_{ij}\), then the normalize matrix is: $$ W_{norm} = D^{-1/2} W D^{-1/2} $$

Usage

Laplacian.norm(W)

Value

The normalized adjacency matrix of the network

Arguments

W

an object representing the graph to be normalized

Methods

signature(W = "graph")

an object of the virtual class graph (hence including objects of class graphAM and graphNEL from the package graph)

signature(W = "matrix")

a matrix representing the adjacency matrix of the graph

Examples

Run this code
library(bionetdata);
# normalization of drug-drug similarity networks
data(DD.chem.data);
W <- Laplacian.norm(DD.chem.data);
# the same using an object of class graphAM
g <- new("graphAM", adjMat=DD.chem.data, values=list(weight=DD.chem.data));
Wg <- Laplacian.norm(g);

Run the code above in your browser using DataLab