Ask Your Question

Why is SVMClassifier.train throwing a KernelException?

asked 2013-04-29 09:44:33 -0500

blz gravatar image
hueex = HueHistogramFeatureExtractor()
svm = SVMClassifier([hueex])
svm.train([train_airplanes, train_leaves], ['Airplanes', 'Leaves'])


Opening file: /home/louist/Documents/Python/simplecv/example_datasets/AirplanesLeaves/Train/Airplanes/0641.jpg


Opening file: /home/louist/Documents/Python/simplecv/example_datasets/AirplanesLeaves/Train/Leaves/image_0030.jpg
Opening file: /home/louist/Documents/Python/simplecv/example_datasets/AirplanesLeaves/Train/Leaves/image_0062.jpg
Opening file: /home/louist/Documents/Python/simplecv/example_datasets/AirplanesLeaves/Train/Leaves/image_0071.jpg
Opening file: /home/louist/Documents/Python/simplecv/example_datasets/AirplanesLeaves/Train/Leaves/image_0046.jpg
Opening file: /home/louist/Documents/Python/simplecv/example_datasets/AirplanesLeaves/Train/Leaves/image_0015.jpg
KernelException                           Traceback (most recent call last)
<ipython-input-19-6fe4fe412f76> in <module>()
      1 svm = SVMClassifier([hueex])
----> 2 svm.train([train_airplanes, train_leaves], ['Airplanes', 'Leaves'])

/usr/local/lib/python2.7/dist-packages/SimpleCV/MachineLearning/SVMClassifier.pyc in train(self, paths, classNames, disp, subset, savedata, verbose)
    241             orange.saveTabDelimited (savedata, self.mDataSetOrange)
--> 243         self.mClassifier = self.mSVMPrototype(self.mDataSetOrange)
    244         correct = 0
    245         incorrect = 0

KernelException: 'orange.SVMLearner': LibSVM parameter error: specified nu is infeasible

Note that I did install the Orange library via pip install Orange --user. What is the meaning of this exception?

On an unrelated note: I can't seem to comment answers other than my own. Is this normal behavior for thise site? Please advise.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-04-29 10:19:47 -0500

kscottz gravatar image

This error is living down in LibSVM land so it is not immediately a SimpleCV problem. It seems to be choking on your Nu parameter. You can adjust it using the properties dict for the SVM. You may just want to use a C slack variable versus nu in your SVM. I would take a look at the source for more info. The gives a few good examples of how to use the ML tools.

The commenting on answers I believe is related to your karma. We don't

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2013-04-29 09:44:33 -0500

Seen: 1,522 times

Last updated: Apr 29 '13