PCS_run: Simulate the run of a PCS model

Description Usage Arguments Value

Description

PCS_run simulates a PCS network given a pre-specified interconnection matrix and model parameters, according to the mechanism outlines by McClelland and Rumelhart (1981).

Usage

1
2
3
4
PCS_run(interconnection_matrix, initial_state, resting_levels, reset,
  node_names = NULL, stability_criterion = 10^-6, max_iterations = Inf,
  convergence_criteria = c(PCS_convergence_McCandR),
  convergence_names = NULL)

Arguments

interconnection_matrix

A square, matrix representing the link weights between nodes, such that each entry w_ij represents the link strength between nodes i and j. Accordingly, for a network of n nodes, the matrix must be of six n*n. In most applications, the matrix will be symmetric, meaning that links are bidirectional.

initial_state

Initial node activations before the first iteration is run. In most cases, this will be a vector of zeros, with the length corresponding to the number of nodes in the network.

resting_levels

Resting activation level for each node. In most cases, this will be a vector of zeros, with its length corresponding to the number of nodes in the network.

reset

Vector denoting nodes with stable activation values. The vector contains a value for each node; if it is unequal to zero, the node activation will be reset to this value after each iteration.

node_names

Vector specifying human-readable labels for every node, or 'default', in which case nodes are automatically named.

stability_criterion

Stability theshold for convergence criteria. If energy changes across iterations fall below this threshold, the model is considered to have converged.

max_iterations

Maximum number of iterations to run before terminating the simulation.

convergence_criteria

Array of convergence criteria to apply. This PCS implementation allows users to define and observe multiple convergence criteria in one model. Each entry in this array is a convergence criterion, which is representated as a function that receives the current iteration, energy, model state history and the stability_criterion defined above and returns a boolean value representing whether the particular criterion is met given the model's current state.

convergence_names

Human-readable labels for the convergence criteria, or 'default', in which case the criteria are numbered automatically, in which case the criteria are numbered automatically.

Value

A list representing the model state after all convergence criteria have been fullfilled. The key iterations contains the model state over its entire run, while the key convergence defines which convergence criteria have been met at which iteration. Together, these provide an exhaustive summary of the model's behavior.


PCSinR documentation built on May 2, 2019, 2:02 p.m.