actual_score: Calculation of diffusion score for each node

View source: R/actual_score_calculation.R

actual_scoreR Documentation

Calculation of diffusion score for each node

Description

Calculation of diffusion score for each node

Usage

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

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.

Value

a vector of diffusion scores.

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


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