The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"SVM class weights, unexpected results."
Hey Guys,
I have been exploring using different class weights in LibSVM for a binary classification problem with 2000 (-1) samples and 5000 (+1) samples. In the literature it seems that setting the ratio of complexity factors to C+1 : C-1 = (-1) : (+1) = 2:5 will result in a balanced number of support vectors between the two classes. Unfortunately no matter what I set my class weights to the support vector ratio is always imbalanced. Ideally I would like to have the same ratio of support vectors for both classes despite having a class imbalance in the training data.
Any Ideas? ???
Also, I noticed that the 'SVM' (not libsvm) operator has a balance cost option, however the model summary returns the number of support vectors incorrectly, namely it counts each training sample as a support vector even though in the support vector table there are clearly many non support vectors. :P
Thanks,
-Gagi
I have been exploring using different class weights in LibSVM for a binary classification problem with 2000 (-1) samples and 5000 (+1) samples. In the literature it seems that setting the ratio of complexity factors to C+1 : C-1 = (-1) : (+1) = 2:5 will result in a balanced number of support vectors between the two classes. Unfortunately no matter what I set my class weights to the support vector ratio is always imbalanced. Ideally I would like to have the same ratio of support vectors for both classes despite having a class imbalance in the training data.
Any Ideas? ???
Also, I noticed that the 'SVM' (not libsvm) operator has a balance cost option, however the model summary returns the number of support vectors incorrectly, namely it counts each training sample as a support vector even though in the support vector table there are clearly many non support vectors. :P
Thanks,
-Gagi
0
Answers
I'm not too familiar with the implementations, but might it be that each support vector will receive a lower weight? So that the count might be greater, but the weight sums equally among the classes.
Greetings,
Sebastian