local_temporal_three_node_motifs#

local_temporal_three_node_motifs(graph, delta, threads=None)#

Computes the number of each type of motif that each node participates in. See global_temporal_three_node_motifs for a summary of the motifs involved.

Parameters:
  • graph (GraphView) – A directed raphtory graph

  • delta (int) – Maximum time difference between the first and last edge of the motif. NB if time for edges was given as a UNIX epoch, this should be given in seconds, otherwise milliseconds should be used (if edge times were given as string)

Returns:

A mapping from nodes to lists of motif counts (40 counts in the same order as the global motif counts) with the number of each motif that node participates in.

Return type:

NodeStateMotifs

Notes

For this local count, a node is counted as participating in a motif in the following way. For star motifs, only the centre node counts

the motif. For two node motifs, both constituent nodes count the motif. For triangles, all three constituent nodes count the motif.