svm weights

asked 2014-11-13 15:49:22 -0500

fnhdx gravatar image

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.

edit retag flag offensive close merge delete