Open LeonardoIalongo opened 1 month ago
Code to reproduce:
import numpy as np
from NuMeTriS import Graph
A = np.array([
[0, 1, 1],
[0, 0, 0],
[0, 0, 0]
])
# Create graph object
G = Graph(adjacency=A)
print(G.Nm_emp)
# [2. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
I noticed that the counts you algorithm returns do not take into consideration the symmetry of the pattern, such that the same triad (i,j,k) can be counted multiple times according to the number of permutation symmetry of the traid. As an example consider the first motif (the V-shaped), which has one edge from i to j and one edge from i to k, but no edge from j to k and not reciprocated links. From the point of view of the triples (i,j,k), we note that also (i,k,j) will be admissible. I believe the code is double counting the triads in this sense.