Closed xia0pin9 closed 6 years ago
Hi, you are probably using version 0.1a3 of grakel which is the only currently uploaded to pip.
To display execute
pip show grakel-dev
Please install and use the latest version of grakel, namely the one from the repository (I think this error has been fixed around 1 month now). This is one of many bugfixes that will be uploaded as a version 0.1a4 of grakel to PyPi as soon as we finish a huge experimentation, we are currently conducting on the whole library (from which small errors may be raised to the surface).
Thanks for your understanding.
Seems 0.1a4 still has this problem.
In [28]: grakel.__version__
Out[28]: '0.1a4'
In [29]: sp_kernel.fit(g0)
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-29-43dee3967136> in <module>()
----> 1 sp_kernel.fit(g0)
/usr/local/lib/python2.7/dist-packages/grakel/graph_kernels.pyc in fit(self, X, y)
315 self.component_indices_ = inds
316 else:
--> 317 self.kernel.fit(X)
318
319 # Return the transformer
AttributeError: 'dict' object has no attribute 'fit'
When following the documentation to conduct one to one graph comparison using the following code:
wl_kernel.fit(H2O).transform(H3O)
It raises an AttributeError exception: