1 | initial version |
there is no problem with setting the weights using
svm->setClassWeights(weights);
at all. while you could also pass them into the TrainData
structure, it does not matter, in both cases we have valid classWeights in SVMImpl::do_train()
. (where those are actually used)
it also does not matter, if you make it 1x4 or 4x1, the only requirement is: 1 dim has to 1, the other numClasses (and type should be float or double).
so, everything is all right, and happy coding ;)
2 | No.2 Revision |
there is no problem with setting the weights using
svm->setClassWeights(weights);
at all. while you could also pass them into the TrainData
structure, it does not matter, in both cases we have valid classWeights params.classWeights
in SVMImpl::do_train()
. (where those are actually used)
it also does not matter, if you make it 1x4 or 4x1, the only requirement is: 1 dim has to 1, the other numClasses (and type should be float or double).
so, everything is all right, and happy coding ;)
3 | No.3 Revision |
there is no problem with setting the weights using
svm->setClassWeights(weights);
at all. while you could also pass them into the TrainData
structure, it does not matter, in both cases we have valid params.classWeights
in SVMImpl::do_train()
. (where those are actually used)
it also does not matter, matter, if you make it 1x4 or 4x1, the only requirement is: requirements are:
so, everything is all right, and happy coding ;)