null_score: Calculation of diffusion null scores for each node

View source: R/null_matrix_calculation.R

null_scoreR Documentation

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)

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

Value

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

Examples

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)


DiffNet documentation built on Nov. 22, 2023, 5:07 p.m.

Related to null_score in DiffNet...