{"action":"opened","issue":{"url":"https://api.github.com/repos/mshabunin/test2/issues/795","labels_url":"https://api.github.com/repos/mshabunin/test2/issues/795/labels{/name}","comments_url":"https://api.github.com/repos/mshabunin/test2/issues/795/comments","events_url":"https://api.github.com/repos/mshabunin/test2/issues/795/events","html_url":"https://github.com/mshabunin/test2/issues/795","id":95468421,"number":795,"title":"NormalBayesClassifier ","user":{"login":"mshabunin","id":3304494,"avatar_url":"https://avatars.githubusercontent.com/u/3304494?v=3","gravatar_id":"","url":"https://api.github.com/users/mshabunin","html_url":"https://github.com/mshabunin","followers_url":"https://api.github.com/users/mshabunin/followers","following_url":"https://api.github.com/users/mshabunin/following{/other_user}","gists_url":"https://api.github.com/users/mshabunin/gists{/gist_id}","starred_url":"https://api.github.com/users/mshabunin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshabunin/subscriptions","organizations_url":"https://api.github.com/users/mshabunin/orgs","repos_url":"https://api.github.com/users/mshabunin/repos","events_url":"https://api.github.com/users/mshabunin/events{/privacy}","received_events_url":"https://api.github.com/users/mshabunin/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mshabunin/test2/labels/affected:%20master","name":"affected: master","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/auto-transferred","name":"auto-transferred","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/category:%20ml","name":"category: ml","color":"ededed"},{"url":"https://api.github.com/repos/mshabunin/test2/labels/priority:%20high","name":"priority: high","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-07-16T16:08:12Z","updated_at":"2015-07-16T16:08:12Z","closed_at":null,"body":"Transferred from http://code.opencv.org/issues/4429\r\n```\n|| Oliver Naumann on 2015-06-23 08:50\n|| Priority: High\n|| Affected: branch 'master' (3.0-dev)\n|| Category: ml\n|| Tracker: Bug\n|| Difficulty: Easy\n|| PR: \n|| Platform: Any / Any\n```\n\nNormalBayesClassifier \n-----------\n```\nIn: *modules/ml/src/nbayes.cpp* (Line 316)\r\n\r\nWrong plausibility check leads to a CV_Error.\r\n\r\nShould be:\r\n<pre>\r\nif( samples.rows > 1 && ! _results.needed() )\r\n</pre>\n```\n\nHistory\n-------\n##### be rak on 2015-07-01 13:33\n```\ngiven a Ptr<NormalBayesClassifier> bayes;\n\nif bayes->predict(test) is called with more than one row in test, an exception should be thrown (because no results Mat was supplied for the return value).\n\ndue to the error above, this does not happen and the results and probabilities Mat's are not allocated correctly.\n\nfor more background see:\nhttp://answers.opencv.org/question/64575/normalbayesclassifier-predict-errors/\n\n\n\nhttps://github.com/Itseez/opencv/pull/4167\n```"}}