ysig / GraKeL

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

something wrong using graphlet sampling #2

Closed cenyk1230 closed 6 years ago

cenyk1230 commented 6 years ago

I used graphlet kernel for graph classification, but got following error. Would you please help me?

Traceback (most recent call last): File "group_kernel.py", line 79, in K_test = gk.transform(X_test) File "/home/yukuocen/py_env/lib/python2.7/site-packages/grakel-0.1a2-py2.7-linux-x86_64.egg/grakel/graphkernels.py", line 344, in transform K = self.kernel.transform(X) File "/home/yukuocen/py_env/lib/python2.7/site-packages/grakel-0.1a2-py2.7-linux-x86_64.egg/grakel/kernels/graphlet_sampling.py", line 247, in transform Y = self.parse_input(X) File "/home/yukuocen/py_env/lib/python2.7/site-packages/grakel-0.1a2-py2.7-linux-x86_64.egg/grakel/kernels/graphlet_sampling.py", line 439, in parse_input self._Y_graph_bins[j], sg): KeyError: 1

ysig commented 6 years ago

Sorry for the delay, but without knowing my notifications where turned off. I detected the indexing problem and i will remove in a big push (containing more changes) I will do either today or tomorrow.

Let me know if the problem gets fixed. Thanks for the feedback!

cenyk1230 commented 6 years ago

Waiting for your push. Thanks!

ysig commented 6 years ago

Push .. done! Try now and inform me if you have any errors. Thanks!

cenyk1230 commented 6 years ago

I have tried the graphlet kernel and it works! Thanks 👍

BTW, the current version number is 0.1.2a, but there is still 0.1a2 in setup.py.

ysig commented 6 years ago

Perfect 0.1a2 is the correct. I misspelled it on the commit message.

Thanks!