benedekrozemberczki / karateclub

Karate Club: An API Oriented Open-source Python Framework for Unsupervised Learning on Graphs (CIKM 2020)
https://karateclub.readthedocs.io
GNU General Public License v3.0
2.15k stars 244 forks source link

graphwave changing structure of matrix and gives warning #88

Closed jhammarstedt closed 2 years ago

jhammarstedt commented 2 years ago

Hi, I'm encountering "WARNING: The main diagonal of the weight matrix is not 0!" when running GraphWave.fit(G)

When passed in to .fit() my graph has a 0 diagonal. But after running the GraphWave.fit() the diagonal changes to 1 and I get the warning. Is this expected?

laurahdezlorenzo commented 1 year ago

Hi!

I'm encountering the same warning when using GraphWave. Any updates about this?

LucaCappelletti94 commented 1 year ago

Hello @laurahdezlorenzo and @jhammarstedt. The warning derives from the graph object of pygsp, which is created with pygsp.graphs.Graph(nx.adjacency_matrix(graph)).

It is not particularly related to the GraphWave model or KarateClub.

laurahdezlorenzo commented 1 year ago

You're right, sorry for the inconvenience :) thanks a lot!

LucaCappelletti94 commented 1 year ago

No worries. Please do feel free to re-open this issue if the warning turns out to be more problematic than expected.