SVM NU_SVC with sigmoid kernel leads to nan values

asked 2014-10-29 03:59:45 -0600

thdrksdfthmn gravatar image

I have tried to train different SVMs, and I have used train_auto function. I have seen that it keeps the kernel type mentioned in the SVMParams (and also the svm type, but that is mentioned in the docs). So I have arrived at the sigmoid kernel type and it has trained the classifier, but it has finished with an xml that finishes with the following:

        .Inf .Inf .Inf .Inf .Inf .Inf .Inf .Inf .Inf -.Inf -.Inf -.Inf
        -.Inf -.Inf -.Inf -.Inf -.Inf -.Inf</alpha>
        0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17</index></_>

And for every predict it is returning a nan value. Is it normal? What have I done wrong? I have 2 classes of about 840 images each (positives and negatives). I have also let the default grids for each parameter:

plateClassifier.train_auto(trainingData, classes, cv::Mat(), cv::Mat(), svmParamsIn);
edit retag flag offensive close merge delete