I wanted to work with the shortest path graph kernel and encountered errors while running the test:
pykernels git:(master) ✗ python -m unittest tests.shortestpath
EE
======================================================================
ERROR: testLabeledSPKernel (tests.shortestpath.TestShortestPath)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/shortestpath.py", line 39, in testLabeledSPKernel
self.assertTrue((K.gram(data)==self.answers_labeled[i]).all())
File "pykernels/base.py", line 32, in gram
return self._compute(data, data)
File "pykernels/graph/shortestpath.py", line 100, in _compute
labels_1, numlabels)
File "pykernels/graph/shortestpath.py", line 67, in _create_accum_list_labeled
max_lab - min_lab
ValueError: operands could not be broadcast together with shapes (10,10,10) (10,10,100)
======================================================================
ERROR: testSPKernel (tests.shortestpath.TestShortestPath)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/shortestpath.py", line 32, in testSPKernel
self.assertTrue((K.gram(data)==self.answers_unlabeled[i]).all())
File "pykernels/base.py", line 32, in gram
return self._compute(data, data)
File "pykernels/graph/shortestpath.py", line 94, in _compute
accum_list_1 = self._create_accum_list(sp_1, maxpath)
File "pykernels/graph/shortestpath.py", line 83, in _create_accum_list
accum[:ind.max() + 1] += np.bincount(ind.astype(int))
ValueError: object too deep for desired array
----------------------------------------------------------------------
Ran 2 tests in 3.157s
FAILED (errors=2)
Then I noticed that all other tests failed as well except for the test written in basic.py. I've tried to debug the errors but couldn't solve it. Not sure if there's something wrong with the test data, the test or the actual code?
I wanted to work with the shortest path graph kernel and encountered errors while running the test:
Then I noticed that all other tests failed as well except for the test written in
basic.py. I've tried to debug the errors but couldn't solve it. Not sure if there's something wrong with the test data, the test or the actual code?