CvSVMParams.class_weights not getting set in Python (Bug #3655)


Added by Hans Gaiser almost 11 years ago. Updated almost 10 years ago.


Status:Done Start date:2014-04-16
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:python bindings
Target version:3.0
Affected version:branch 'master' (3.0-dev) Operating System:Mac OSX
Difficulty:Medium HW Platform:x64
Pull request:https://github.com/Itseez/opencv/pull/3846

Description

Hey,

I came across a bug in the python bindings of CvSVM. The parameters CvSVMParams include a parameter to set class weights (or a bias), however these settings do not go through to the core when setting it in Python. In modules/ml/include/opencv2/ml.hpp the class_weights parameter is not flagged with CV_PROP_RW and is therefore not parsed by the hdr_parser.py. If this is added, a linking error spawns because it can't convert a CvMat* to a python object and vice versa.

Check http://answers.opencv.org/question/31805/svm-weights-parameter-not-set-through-python for more information.


Associated revisions

Revision 1f47c223
Added by Vadim Pisarevsky about 10 years ago

Merge pull request #3655 from asmorkalov:remove_opencv_testing_sh

History

Updated by Maksim Shabunin almost 10 years ago

  • Status changed from New to Done
  • Pull request set to https://github.com/Itseez/opencv/pull/3846

Also available in: Atom PDF