Commit 41af8aa0 authored by Alexander Alekhin's avatar Alexander Alekhin

Merge pull request #16017 from berak:fix_svm_train_auto

parents 873250f5 0dfab6bb
......@@ -1451,7 +1451,7 @@ public:
sortSamplesByClasses( _samples, _responses, sidx_all, class_ranges );
//check that while cross-validation there were the samples from all the classes
if( class_ranges[class_count] <= 0 )
if ((int)class_ranges.size() < class_count + 1)
CV_Error( CV_StsBadArg, "While cross-validation one or more of the classes have "
"been fell out of the sample. Try to reduce <Params::k_fold>" );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment