Nu is not valid

I am using the NuSVC class in sklearn. After trying to instantiate a NuSVC object like this:

self.classifier = OneVsRestClassifier(NuSVC())

      

I found myself getting the "specified nu is uneasible" error repeatedly. I tried changing the "nu" parameter from 0.1 to 1. (in 0.1 increments), but I still get the same error. I'm really not sure how to interpret this message and how to solve it? I figured if I set nu to 1. it works because nu represents an upper bound on the proportion of learning errors that I believe should always be acceptable. What could be causing this?

Thanks for the help!

+3


source to share


1 answer


For completeness, from the documentation : Nu-SVM is a restricted SVM formulation (equivalent to the original before reparameterization), which is a hard-hitting admissible misclassification. If this estimate cannot be satisfied, then the associated convex optimization problem becomes impossible.

From this point of view, the first thing you need to research is how many learning errors you can actually expect, and perhaps revise your assumptions. Search the grid C

for the default SVM to test this.



NuSVC should work with some values โ€‹โ€‹strictly less than 1. According to your description, you tried 0.9 - start adding 9s, which is 0.99, 0.999. If at some point this does not work, then there is another problem somewhere.

+2


source







All Articles