Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

svm weights

I have simple question about svm weights. I am doing a binary classification. I want to set different weights for different classes. My code is like this

Mat weights = (Mat_<double>(2,1)<<1,2);
CvMat weight = weights;
param.class_weights = &weight;

I am wondering which weight is for which class(negative/positive)? I didn't it from opencv document. thanks.