ysig / GraKeL

A scikit-learn compatible library for graph kernels
https://ysig.github.io/GraKeL/
Other
593 stars 97 forks source link

How to use the edge weight information of a graph? #77

Closed happysnzy closed 1 year ago

happysnzy commented 2 years ago

First of all thank you very much, Grakel really helped me a lot with my research. But I'm currently running into a problem. I want to compute graph similarity using Grakel, such as random walk kernel. But I read the introduction in the document (https://ysig.github.io/GraKeL/0.1a8/graph_kernel.html), these kernels do not use the edge weight information of the graph. I sincerely want to know how I can take advantage of the weighted edges of the graphs.

ysig commented 2 years ago

You can use weight information if you add it as float values in the agacency matrix.

giannisnik commented 2 years ago

Hi @happysnzy , This has been discussed in the past. See this: https://github.com/ysig/GraKeL/issues/37