Skip to contents

Network Diffusion

Usage

ND(X0, W, alpha=0.7, nMax=1e4, eps=1e-6, finalSmooth=FALSE, 
fullOutput=FALSE, verbose=FALSE)

Arguments

X0

vector or matrix composed of column vectors with initial distribution of information

W

symmetrically normalized adjacency matrix W = D^-1 A D^-1, see normalize_adj_mat function

alpha

numeric, the smothing factor

nMax

numeric, maximum number of iterations

eps

numeric, the iteration will stop when the maximum difference between matrix Xs between two consecutive iteraction is smaller than eps

finalSmooth

TRUE/FALSE, whether to do the final step of smoothing

fullOutput,

TRUE/FALSE, whether to output all steps

verbose,

TRUE/FALSE

Value

A matrix with steady state values. If fullOutput is TRUE, a list with:

Xs

the smoothed matrix;

eps

see above;

maxAbsDiff

maximum absolute difference between F(t) and F(t+1);

XsAll

transient Xs matrices.

Examples

if (FALSE) ND(X0, W, alpha=0.7, nMax=1e4, eps=1e-6, finalSmooth=FALSE, 
fullOutput=FALSE, verbose=FALSE)