View source: R/actual_score_calculation.R
actual_score | R Documentation |
Calculation of diffusion score for each node
actual_score(graph, initial.score, damping = 0.7)
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. |
This function calculates the diffusion score for each node using the personalized page rank algorithm.
a vector of diffusion scores.
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)
Actual_score = actual_score(graph = graph, initial.score = initial_score, damping = 0.7)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.