Learn R Programming

Rato (version 0.1.0)

Barabasi.B_eff: Average the product of the outgoing and incoming degrees of nodes

Description

This is the average of the outgoing/incoming nodes, described by Barabasi in his paper 'Universal resilience patterns in complex networks'.

Usage

Barabasi.B_eff(M)

Value

A numeric value describing the Beta_eff described by Barabasi.

Arguments

M

Adjacency matrix of the network that describes the system

Examples

Run this code
# \donttest{
   node_file <- system.file("extdata", "IL17.nodes.csv", package = "Rato")
   edge_file <- system.file("extdata", "IL17.edges.csv", package = "Rato")
   g <- Rato::graph.from.csv(node_file, edge_file, sep=",", header=TRUE)
 
   initial_parameters <- function(M){
     initial_params <- list('f' = 1, 'h' = 2, 'B' = 0.1, 'Beta' = Rato::Barabasi.B_eff(M))
     return(initial_params)
   }
   
   update_parameters <- function(params){
     M <- params$M
     params$Beta <- Rato::Barabasi.B_eff(M)
     return(params)
   }
 
   Rato::node.removal.thread( system = Rato::Michaelis.Menten.Fast
                            , M = g$M
                            , x0 = Rato::Barabasi.X_eff(g$M, g$initial_values)
                            , initial_params = initial_parameters
                            , update_params = update_parameters
                            , to.numeric = TRUE)

# }

Run the code above in your browser using DataLab