Learn R Programming

DiffNet (version 1.0.2)

null_score: Calculation of diffusion null scores for each node

Description

Calculation of diffusion null scores for each node

Usage

null_score(graph, initial.score, damping = 0.7, N.repeat = 10, n.cores = 1)

Value

a matrix of null diffusion scores (N.repeat—BY—number_of_nodes).

Arguments

graph

an igraph object with the length of N

initial.score

a named vector of node preferences of length N served as the initial values for diffusion algorithm.

damping

The damping factor of the diffusion algorithm.

N.repeat

number of permutation repeats of null scores.

n.cores

number of cores for parallel processing.

Details

This function calculates the null diffusion score for each node using the personalized page rank algorithm. The initial values are obtained by permuting the given initial.score

Examples

Run this code
graph = graph_generation(n.nodes = 10, prob.connection = 0.5)
initial_score = c(rep(0,5),0.2, 0.3, 0, 0, 0.5)
names(initial_score) = igraph::V(graph)
Null = null_score(graph, initial_score)

Run the code above in your browser using DataLab