Python error when using Anaconda
######################################################### Issues 1: ######################################################### In [5]: clf.fit(x,y) 2018-03-13 22:49:53,831 INFO [default] #instances = 150, #features = 4 2018-03-13 22:49:53,979 INFO [default] training start 2018-03-13 22:49:54,135 INFO [default] global iter = 0, total local iter = 0 2018-03-13 22:49:54,136 INFO [default] global iter = 3, total local iter = 0 2018-03-13 22:49:54,136 INFO [default] rho = -0.062077 2018-03-13 22:49:54,136 INFO [default] #sv = 11 2018-03-13 22:49:54,138 INFO [default] training start 2018-03-13 22:49:54,139 INFO [default] global iter = 0, total local iter = 0 2018-03-13 22:49:54,140 INFO [default] global iter = 4, total local iter = 0 2018-03-13 22:49:54,140 INFO [default] rho = 0.0158995 2018-03-13 22:49:54,140 INFO [default] #sv = 8 2018-03-13 22:49:54,141 INFO [default] training start 2018-03-13 22:49:54,142 INFO [default] global iter = 0, total local iter = 0 2018-03-13 22:49:54,143 INFO [default] global iter = 4, total local iter = 0 2018-03-13 22:49:54,143 INFO [default] rho = 0.0521937 2018-03-13 22:49:54,143 INFO [default] #sv = 47 2018-03-13 22:49:54,144 INFO [default] #total unique sv = 59 2018-03-13 22:49:54,144 INFO [default] training finished Segmentation fault (core dumped) ################################################### When I use clf = SVC() and clf.fit(x,y), it crashed after training. Ubuntu16.04, cuda8.0. IF I use ./bin/thunder_svmtrain its ok. ###########################################################
########################################################### Issues 2: ########################################################### Just found from svm import * output errors (when I update today after it is fixed some bugs of windows In [4]: from svm import *
NameError Traceback (most recent call last)
~/Documents/Python/svmsets/thundersvm/python/svm.py in
NameError: name 'platform' is not defined ############################################################
############################################################# Just wonder if you like to add clf.decision_function() method just as sklearn.svm.SVC does? Thanks! #############################################################
Thanks for your feedback! For issue1: I didn't meet segmentation fault for test_dataset.txt(I guess it is the dataset you used) on python 2.7.5 and python 3.4.5. Can you tell me the python version you use? Thank you.
For issue2: The error was caused by my carelessness... I just fixed it and you can update the code.
For the method clf.decision_function(). I'm going to add it. I'll let you know after finishing it.
Thanks! I have two python version environments: 2.7.14 and 3.6.4, but both of them crash after training. what confused me is only clf.fit crashes, we I use svm_train method (from svm import ) or ./bin/thundersvm-train they both work well.
I tried python 2.7.14 and it works fine. The scikit interface will call some functions to get attributes after training finished so it should be something wrong here. I'm wondering do you rebuild the newest thundersvm? Can you update the code and rebuild the library and then use the scikit interface? I think maybe you use the newest scikit interface to call an older thundersvm. If problem still exists, please attach the full instructions you used. Thanks!
Yes, I rebuild after I update the code, and actually, I finally delete the old one's dir and download the new version and build again when I found that rebuild does not work.
unbuntu 16.04, python 3.6.4, cuda8.0, cudnn7, anaconda3-4.4.11,
I finally found that there seems to be conflicts between Anaconda and Ubuntu system library. I tried to use python in Anaconda and I got the same error. However I don't know how to fix it now. Can you use python not in anaconda?
By the way, the newest version of thundersvm scikit interface supports decision_function() now. You can have a try. Thanks.
Thanks! I try on another computer this time clf.fit and clf.decision_function works well.