I have a dataframe df with:
Source, Target
aaaa, bbbb
aaaa, cccc
aaaa, dddd
bbbb, cccc
cccc, dddd
and so on.
I get a graph object via:
g = ig.Graph.TupleList(df.itertuples(index=False), directed=True)
tc = g.triad_census()
print(tc.t030T)
> 304
How can I mark all nodes in that graph with the triad value (A, B, C, None) for triad type 030T so that I can filter/plot triads and non-triads differently?
Function .triad_census() can count the number of triads but I see no option to know which nodes are part of one and which aren't?
from How can I mark all triads of a specific type (e.g. 030T) in a graph?
No comments:
Post a Comment