glp: Run Generic Label Propagation (GLP) with a fixed parameter

Description Usage Arguments Value References Examples

Description

This function runs the iterative procedure necessary to compute GLP for a given parameter lambda, exactly as in Equation 1 in Mostafavi et al. (2012).

Usage

1
glp(M, y, lambda, tol = 1e-04, max_iter = 100L, verbose = 0L)

Arguments

M

normalized affinity matrix, as returned by normalize_A(), of size N x N. Must be of class sparseMatrix.

y

vector of labels, of length N. Must be of class sparseVector.

lambda

GLP parameter (between 0 and 1).

tol

tolerance for the stopping creiterion.

max_iter

maximum number of iterations.

verbose

print every verbose (0 means no output).

Value

A vector of length N with the estimated scores.

References

Mostafavi, S., Goldenberg, A., & Morris, Q. (2012). Labeling nodes using three degrees of propagation. PloS one, 7(12), e51947.

Examples

1
2
3
sim_SBM = simulate_simple_SBM(N = 2500L, p_1 = 0.2, D = 0.04, R = 0.25)
M = normalize_A(sim_SBM$A, "asym")
glp(M=M, y=sim_SBM$y, lambda=0.1, max_iter = 10L, verbose = 1L)

miguelbiron/threepRop documentation built on May 29, 2019, 9:31 a.m.