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


Added by Mikulas Krupicka over 5 years ago. Updated almost 2 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.


History

Updated by Alexander Shishkov over 5 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 about 5 years ago

  • Target version deleted ()

Updated by Alexander Shishkov about 5 years ago

  • Priority changed from High to Normal

Updated by Alexander Shishkov about 5 years ago

  • Priority changed from Normal to Low

Updated by Alexander Shishkov about 5 years ago

  • Assignee deleted (Maria Dimashova)

Updated by Alexander Shishkov about 5 years ago

  • Target version deleted ()

Updated by Maria Dimashova over 4 years ago

  • Target version deleted ()

Updated by Kirill Kornyakov over 4 years ago

  • Target version set to Next Hackathon

Updated by Maksim Shabunin almost 2 years ago

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

Also available in: Atom PDF