Description Usage Arguments Details Value References Examples
Traverses a network using a switcher-random walk process repeatedly, records the earliest visit to nodes of interest and averages the result.
1 2 | search_rw_mean(adjlist, start, observe, nmax = 1000L, pjump = 0,
type = 0L, nrep = 100L)
|
adjlist |
a list containing row indices of nodes adjacent node to the ith node as created by get_adjlist. |
start |
integer vector of length 1 or larger specifying the index of the start node. |
observe |
integer vector specifying the nodes whose first visits should be recorded. |
nmax |
integer specifying the maximum number of steps. |
pjump |
numeric specifying the probability of a jump. |
type |
integer controlling network start and jump nodes.
For |
nrep |
integer specifying the number of iterations across which aggregates are computed. |
Beginning at a given start node, function traverses a network using switcher random walk and records for each of a list of nodes of interest the index at which the respective nodes have been visited first.
If a node specified in observe
has never been visited then the function
returns nmax
for that node.
Numeric, 3 column matrix containing in each row the start node, the end node, and the (minimum) number of steps it took to reach the end node from the start node.
Wulff, D. U., Hills, T., & Mata, R. (2018, October 29). Structural differences in the semantic networks of younger and older adults. https://doi.org/10.31234/osf.io/s73dp
Goni, J., Martincorena, I., Corominas-Murtra, B., Arrondo, G., Ardanza- Trevijano, S., & Villoslada, P. (2010). Switcher-random-walks: A cognitive- inspired mechanism for network exploration. International Journal of Bifurcation and Chaos, 20(03), 913-922.
1 2 3 4 5 6 7 8 9 10 | # generate watts strogatz graph
network = grow_ws(n = 100, k = 10)
# determine mean number of steps from node 2 and 6
# to nodes 3, 4, and 5
search_rw_mean(get_adjlist(network), c(2, 6), c(3, 4, 5))
# determine mean number of steps from node 2 and 6 to nodes 3, 4, and 5
# with high jump probability
search_rw_mean(get_adjlist(network), start = c(2, 6), observe = c(3, 4, 5), pjump = .5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.