PGExplainer icon indicating copy to clipboard operation
PGExplainer copied to clipboard

Disconnected motifs in BAMotifs

Open steveazzolin opened this issue 3 years ago • 2 comments

Hello,

I was playing around with train_BA-2motif.ipynb when I realized that some input graphs are not as expected. Specifically, by running this code after the cell where you read the dataset:

for i in adjs:
    d = nx.from_numpy_array(i)
    if not (nx.is_connected(d)):
        nx.draw(d)
        plt.show()

I saw that there are about 40 graphs that are disconnected and in which the target motif has a self-loop. This behavior is unexpected after reading the dataset description of the original paper.

image

steveazzolin avatar Mar 29 '22 16:03 steveazzolin

Related to this: the paper mentions a connectivity constraint applied as cross entropy of adjacent edges but I cannot find the implementation in the code. cc: @flyingdoog

apurvakokate avatar Mar 30 '22 17:03 apurvakokate

@apurva94 I believe you can find it in /codes/forgraph/Explainer.py Btw to me is not clear to which implementation we should refer to between /codes/forgraph/Explainer.py and /codes/Explainer.py

steveazzolin avatar Apr 03 '22 13:04 steveazzolin