### SVM train auto problems

Is there a problem with `SVM::train_auto`

? I am asking this because I have tried to train different SVM classifiers to get the best one. I have also used the default grids of OpenCV. But I have met the following problems:

- Crash when training of the
`EPS_SVR`

with any of the kernel types. I have got the error of `OpenCV Error: Assertion failed (sv_count != 0) in do_train`

at some line of `svm.cpp`

~~. ~~ (I think is 1346, but not sure it is for all). I have also met the problem in another question, but I wanted to say more. - Trained, but having
`Inf`

, `-Inf`

and `nan`

values in `.xml`

file, when using the `NU_SVC`

with `SIGMOID`

kernel type. It also return a `nan`

when calling predict (IMHO: which is normal based on the `.xml`

). - Crash when training the
`NU_SVR`

with `POLY`

kernel because of the same `OpenCV Error: Assertion failed (sv_count != 0) in do_train`

at some line of `svm.cpp`

.

Is this a bug? Is it a bug of `train_auto`

or because of the default grids? What are the default grids? How to find the parameters of default grids, if I want to create custom ones? I think I have also met the problem of `sv_count != 0`

for some values of the parameters, when training manually (with some fixed values of the parameters). I think it is linked about two "big" values or one big and the other not big enough.

The `.xml`

of `NU_SVC`

with `SIGMOID`

kernel type:

```
<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></_></decision_functions>
```