View source: R/null_matrix_calculation.R
null_score | R Documentation |
Calculation of diffusion null scores for each node
null_score(graph, initial.score, damping = 0.7, N.repeat = 10, n.cores = 1)
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. |
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
a matrix of null diffusion scores (N.repeat
—BY—number_of_nodes).
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.