简体   繁体   中英

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) with StringSubsequenceKernel

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.

幕府将军使用的是什么版本?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM