Reputation: 1
I'm long time trying to install the shogun library to use the StringSubsecuenceKernel. finally i did it for python 2.7.I use the code example from another answer from this site
from shogun.Features import *
from shogun.Kernel import *
from shogun.Classifier import *
from shogun.Evaluation import *
from modshogun import StringCharFeatures, RAWBYTE
from shogun.Kernel import StringSubsequenceKernel
import numpy
strings = ['cat', 'doom', 'car', 'boom']
test = ['bat', 'soon']
train_labels = numpy.array([1, -1, 1, -1])
test_labels = numpy.array([1, -1])
features = StringCharFeatures(strings, RAWBYTE)
test_features = StringCharFeatures(test, RAWBYTE)
# 1 is n and 0.5 is lambda as described in Lodhi 2002
sk = StringSubsequenceKernel(features, features, 2, 0.5)
then when i try to do this
del sk
it gives me the following error
Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)
I'm using pycharm community edition 2017.2.4
and shogun library is installed in /usr/lib/python2.7/dist-packages/shogun
normally the installed packages appears in the /usr/local/lib/python2.7/dist-packages directory, but this doesn't.
The question is , why i get this error and how can i avoid it?
thanks for the answer.
Upvotes: 0
Views: 1613