-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ke function to detect edge labels in subgraph_matching kernel not working. #117
Comments
Hello. Wondered by this issue. Sad that maintainer still haven't answered. My investigation leads me to this part of code from here You see that the edge kernel computes if the edge is somewhat called "c-edge". The root of this definition is in this paper. Though for now I don't have the understanding what it means and why not all differences are significant but besides the issue I can assume that the test graph you provided is too small and simple so it is covered by two conditions before the KE calculation. I verified it by printing the values from |
Hi @georgia-max and @Astromis , This happens because the SubgraphMatching Kernel expects directed graphs as input. While your graphs are undirected, you have not added the reverse edges. Thus, if you also add edges
Then, the resulting matrix is:
|
Describe the bug
I am trying to get the similarity scores between the two graphs using the SubgraphMatching Kernel, that take into account both node labels and edge labels :
SubgraphMatching(normalize=True, ke=custom_edge_kernel, kv = custom_label_kernel)
This should result in a score that is not equal to 1 since one of the
edge_labels
is different. However, I am getting a score of 1.To Reproduce
my result running the code is:
Kernel Matrix: [[1. 1.] [1. 1.]]
The text was updated successfully, but these errors were encountered: