Undocumented requirement in CvNormalBayesClassifier::train (Bug #1534)


Added by Mikulas Krupicka about 13 years ago. Updated over 9 years ago.


Status:Open Start date:
Priority:Low Due date:
Assignee:- % Done:

0%

Category:ml
Target version:Next Hackathon
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

In CvStatModel::train it is told, that sample_idx matrix can have CV_32SC1 or CV_8UC1 type. In CvNormalBayesClassifier::train is not any additional info. But when I was trying to train CvNormalBayesClassifier class with sample_idx type set to CV_32SC1, this exception was thrown.

OpenCV Error: Bad argument (There is only a single class) in cvPreprocessCategoricalResponses, file /home/miki/sources/OpenCV-2.3.1/modules/ml/src/inner_functions.cpp, line 729
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/miki/sources/OpenCV-2.3.1/modules/ml/src/inner_functions.cpp:729: error: (-5) There is only a single class in function cvPreprocessCategoricalResponses

When I've changed sample_idx type to CV_8UC1, the exception has been gone.


Associated revisions

Revision f25b77ff
Added by Roman Donchenko over 11 years ago

Merge pull request #1534 from jet47:fix-cuda-5.0-build

History

Updated by Alexander Shishkov about 13 years ago

  • Description changed from In "CvStatModel::train":http://opencv.itseez.com/modules/ml/doc/sta... to In "CvStatModel::train":http://opencv.itseez.com/modules/ml/doc/sta... More

Updated by Alexander Shishkov almost 13 years ago

  • Target version deleted ()

Updated by Alexander Shishkov almost 13 years ago

  • Priority changed from High to Normal

Updated by Alexander Shishkov almost 13 years ago

  • Priority changed from Normal to Low

Updated by Alexander Shishkov almost 13 years ago

  • Assignee deleted (Maria Dimashova)

Updated by Alexander Shishkov almost 13 years ago

  • Target version deleted ()

Updated by Maria Dimashova over 12 years ago

  • Target version deleted ()

Updated by Kirill Kornyakov over 12 years ago

  • Target version set to Next Hackathon

Updated by Maksim Shabunin over 9 years ago

Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4319

Also available in: Atom PDF