how does class weights Parameter in LibSVM work?

Fred12
Fred12 New Altair Community Member
edited November 5 in Community Q&A

hi,

 

how do the parameter setting for class weights in LibSVM work? e.g. if I have a class that is 2x less or 3xless than my main class, can I simply weight them 2x, or 3x respectively?

is it simply that what is meant?? or how does it work? I remember that in the MetaCost operator, the meaning of the weights is somewhat different if I'm correct...

Tagged:

Answers

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    Hi,

     

    Yes the Class Weights parameter allows you to manually adjust the class weights. You could set "Yes" = 1 and "No" = 2. The Metacost operator, if memory serves, uses a cost matrix where you can adjust the penalty of mis-classification. Like Predicted True vs Acutal True = 1 and Predicted True vs Actual False = 4.