You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS family: Linux
Python 3.5 / Shogun 6.1.3 (Both conda)
Attempting to run CrossValidation on an mkl-svm containing a DirectorKernel throws: RecursionError: maximum recursion depth exceeded while calling a Python object
Minimal working example:
from shogun import *
from numpy import *
class DirectorTestKernel(DirectorKernel):
def __init__(self):
DirectorKernel.__init__(self, True)
def kernel_function(self, idx_a, idx_b):
seq1 = self.get_lhs().get_feature_vector(idx_a)
seq2 = self.get_rhs().get_feature_vector(idx_b)
return dot(seq1, seq2)
feats_train=RealFeatures(identity(10))
labels=BinaryLabels(array([1,1,1,1,1,-1,-1,-1,-1,-1]))
ker1 = DirectorTestKernel()
ker2 = DirectorTestKernel()
#ker1 = GaussianKernel(1.0) Test purposes, works with gaussiankernels
#ker2 = GaussianKernel(2.0) Test purposes, works with gaussiankernels
cker = CombinedKernel()
cker.append_kernel(ker1)
cker.append_kernel(ker2)
cft = CombinedFeatures()
cft.append_feature_obj(feats_train)
cft.append_feature_obj(feats_train)
cker.init(cft,cft)
libsvm = LibSVM()
svm = MKLClassification(libsvm)
svm.set_interleaved_optimization_enabled(False)
svm.set_kernel(cker)
svm.set_C_mkl(1000)
svm.set_mkl_norm(1)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
OS family: Linux
Python 3.5 / Shogun 6.1.3 (Both conda)
Attempting to run CrossValidation on an mkl-svm containing a DirectorKernel throws:
RecursionError: maximum recursion depth exceeded while calling a Python object
Minimal working example:
Finally, running x-validation causes a crash:
The text was updated successfully, but these errors were encountered: