Skip to content

Add an orbit-aware triad and quad census #28

Description

@jhollway

node_x_triad() and node_x_tetrad() count the motif types a node takes part
in, not the orbit it occupies within them. In the path i -> k -> j all three
nodes return a profile of one 021C triad, although i sends, k mediates and
j receives.

node_in_motif() therefore cannot recover role equivalence in Burt's sense.
Its documentation now says so, following the review on #18, but the capability
itself is still missing.

An orbit-aware census would close the gap:

Ortmann, Mark, and Ulrik Brandes. 2017. "Efficient orbit-aware triad and quad
census in directed and undirected graphs". Applied Network Science 2(1): 13.
https://doi.org/10.1007/s41109-017-0027-2

@Kaladani reports in #18 (comment)
that on the flattened networkers data the orbit census recovers local role
similarity well, though it is probably too fine grained there. They have an Rcpp
implementation in a local clone of develop, and plan undirected and tetrad/quad
versions that also take covariate labels into account.

Points to settle

  • Compiled code. @Kaladani's view is that this cannot be fast enough without
    C++. That would make it netrics's first compiled code, so it needs a
    src/, Rcpp/cpp11 in Imports, and the extra CRAN build surface that
    brings. Worth deciding before the implementation lands.
  • Naming. The four families are fixed, so an orbit census is a motif:
    node_x_orbit() alongside node_x_triad() and node_x_tetrad().
  • Whether node_in_motif() should use it. Once the census exists,
    node_in_motif() could take an argument choosing between the type census and
    the orbit census, or a separate membership could be added. The former keeps
    the family smaller.
  • Covariate labels. @Kaladani's planned version takes these into account,
    which no current node_x_*() does, so the return shape needs thought.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions