Learn R Programming

DiffNet (version 1.0.2)

actual_score: Calculation of diffusion score for each node

Description

Calculation of diffusion score for each node

Usage

actual_score(graph, initial.score, damping = 0.7)

Value

a vector of diffusion scores.

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.

Details

This function calculates the diffusion score for each node using the personalized page rank algorithm.

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)
Actual_score = actual_score(graph = graph, initial.score = initial_score, damping = 0.7)

Run the code above in your browser using DataLab