Calculate part of the RSS from one node to another.

Share:

Description

This is a helper function for RelationStrengthSimilarity that returns the component of RSS contributed by paths of one particular length r.

Usage

1
  RssThisRadius(x, v1, v2, r, prepped = FALSE)

Arguments

x

numeric matrix, adjacency matrix where the [i,j] entry gives the strength of the link from node i to node j.

v1

numeric, index of the 'from' node.

v2

numeric, index of the 'to' node.

r

numeric, length of paths examined from v1 to v2.

prepped

logical, whether or not the adjacency matrix x has had zeros entered on the diagonal and each row divided by the row sum.

Value

numeric, the part of the Relation Strength Similarity score from v1 to v2 contributed by paths of length r.

Author(s)

Stephen R. Haptonstahl srh@haptonstahl.org

References

"Discovering Missing Links in Networks Using Similarity Measures", Hung-Hsuan Chen, Liang Gou, Xiaolong (Luke) Zhang, C. Lee Giles. 2012.

https://github.com/shaptonstahl/

See Also

RelationStrengthSimilarity

Examples

1
2
3
4
5
6
M <- as.matrix(get.adjacency(graph.atlas(128)))
M
dils:::RssThisRadius(x=M, v1=5, v2=6, r=1)
dils:::RssThisRadius(x=M, v1=5, v2=6, r=2)
dils:::RssThisRadius(x=M, v1=5, v2=6, r=3)
dils:::RssThisRadius(x=M, v1=5, v2=6, r=4)