# SVM NU_SVC with sigmoid kernel leads to nan values

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:

<decision_functions>
<_>
<sv_count>18</sv_count>
<rho>.Nan</rho>
<alpha>
.Inf .Inf .Inf .Inf .Inf .Inf .Inf .Inf .Inf -.Inf -.Inf -.Inf
-.Inf -.Inf -.Inf -.Inf -.Inf -.Inf</alpha>
<index>
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 close merge delete