sirir: SIR-based Influence Ranking

View source: R/functions.R

sirirR Documentation

SIR-based Influence Ranking

Description

This function is achieved by the integration susceptible-infected-recovered (SIR) model with the leave-one-out cross validation technique and ranks network nodes based on their true universal influence. One of the applications of this function is the assessment of performance of a novel algorithm in identification of network influential nodes by considering the SIRIR ranks as the ground truth (gold standard).

Usage

sirir(
  graph,
  vertices = V(graph),
  beta = 0.5,
  gamma = 1,
  no.sim = 100,
  ncores = "default",
  seed = 1234,
  loop_verbose = TRUE,
  node_verbose = FALSE
)

Arguments

graph

A graph (network) of the igraph class.

vertices

A vector of desired vertices, which could be obtained by the V function.

beta

Non-negative scalar. The rate of infection of an individual that is susceptible and has a single infected neighbor. The infection rate of a susceptible individual with n infected neighbors is n times beta. Formally this is the rate parameter of an exponential distribution.

gamma

Positive scalar. The rate of recovery of an infected individual. Formally, this is the rate parameter of an exponential distribution.

no.sim

Integer scalar, the number of simulation runs to perform SIR model on the original network as well as perturbed networks generated by leave-one-out technique. You may choose a different no.sim based on the available memory on your system.

ncores

Integer; the number of cores to be used for parallel processing. If ncores == "default" (default), the number of cores to be used will be the max(number of available cores) - 1. We recommend leaving ncores argument as is (ncores = "default").

seed

A single value, interpreted as an integer to be used for random number generation.

loop_verbose

Logical; whether the accomplishment of the evaluation of network nodes in each loop should be printed (default is TRUE).

node_verbose

Logical; whether the process of Parallel Socket Cluster creation should be printed (default is FALSE).

Value

A two-column dataframe; a column containing the difference values of the original and perturbed networks and a column containing node influence rankings

See Also

cent_network.vis, and sir for a complete description on SIR model

Other centrality functions: betweenness(), clusterRank(), collective.influence(), h_index(), lh_index(), neighborhood.connectivity()

Examples

## Not run: 
set.seed(1234)
My_graph <- igraph::sample_gnp(n=50, p=0.05)
GraphVertices <- V(My_graph)
Influence.Ranks <- sirir(graph = My_graph, vertices = GraphVertices, 
                         beta = 0.5, gamma = 1, ncores = "default", no.sim = 10, seed = 1234)

## End(Not run)

influential documentation built on May 29, 2024, 11:49 a.m.