IGE Laplacian Issue for small graphs
cjchristopher opened this issue · comments
I reference here:
karateclub/karateclub/graph_embedding/ige.py
Line 135 in 653cb4f
The default k value for linalg.eigsh
if not provided is 6, so graphs with 6 or fewer nodes create issues at this step. Without knowing the full reasoning for not specifying the k value at the histrogram stage (it is specified at the previous step of gathering the spectral features), I suggest k=min(graph.number_of_nodes() - 1, 6)
, although, seeing the spectral stage, or understanding the finer details in the paper, I could also see just having k=graph.number_of_nodes() -1
instead of defaulting to only 6 eigens per graph in the collection.
Hi @cjchristopher, and thank you for reporting this problem. This issue has already been patched in the method just above the one you referred to, so I am applying the first fix you have suggested there.