Skip to contents

The ACT spreading activation formula is represented in Equation 1: $$a(y) = \sum_x {f(x,y) \cdot a(x)} + c(y)$$, where \(c(y)\) represents the baseline activation of y. \(\alpha\) represents the proximity of a node in this network. \(t\) represents the iteration number

Usage

spread_gram_1(graph, last_activation, loose = 1)

Arguments

graph

A square matrix (or dgCMatrix representing the background graph. Inside this adjacency matrix, each row and column of the matrix represents a node in the graph. The values of the matrix should be either 0 or 1 (or either 0 or larger than 0), where a value of 0 indicates no relations between two nodes. The diagonal of the matrix should be 0, as there are no self-edges in the graph.

last_activation

A vector that containing the last time activation rates of all nodes. The sequence is the same as the matrix.

loose

A scalar numeric between 0 and 1 that determines the loose (or weight) in the calculation process.

Value

A numeric vector that contains new activation

Examples

library(labyrinth)

# The graph G
data("graph", package = "labyrinth")

# The initial info
last_activation = c(2, 4, 3, 2, 2, 1, 5)

results <- spread_gram_1(graph, last_activation)