I have the following code:
CvSVMParams params;
params.svm_type = CvSVM::EPS_SVR;
params.kernel_type = CvSVM::RBF;
params.term_crit = TermCriteria(CV_TERMCRIT_ITER, (int)1e7, 1e-6);
CvSVM svm;
svm.train_auto(_data, _resp, _var_idx, _train_idx, params);
Here _data and _resp are Mats holding the feature vectors and responses, _var_idx containing the active features and _train_idx the active samples. For the parameter grids the default values are used. Unfortunately, the code produces the following error:
OpenCV Error: Assertion failed (sv_count != 0) in do_train, file /home/.../opencv-2.4.9/modules/ml/src/svm.cpp, line 1346
When I run a regression one the same data with parameters selected by hand it works fine. And when I switch to a classification problem (and change the corresponding parameters and SVM type) it also works. In that case for single training as well as for auto training. Also, when switching to CvSVM::NU_SVR the auto training works fine.
Another thing that bothers me is that I also have to provide the parameter p (EPS_EVR) or nu (NU_SVR) when I want to do auto training. The documentation says that those are also estimated using their corresponding default grids. Why is that so?