title: Class Weight Syntax in Kernlab?
body: <p>Hi I am trying out classification for imbalanced dataset in R using <code>kernlab</code> package, as the class distribution is not 1:1 I am using the option of class.weights in the <code>ksvm()</code> function call however I do not get any difference in the classification scenario when I add weights or remove weights? So the question is what is the correct syntax for declaring the class weights? </p>
  
  <p>I am using the following function calls:</p>
  
  <pre><code>model = ksvm(dummy[1:466], lab_tr,type='C-svc',kernel=pre,cross=10,C=10,prob.model=F,class.weights=c("Negative"=0.7,"Positive"=0.3)) 
  #this is the function call with class weights 
  model = ksvm(dummy[1:466], lab_tr,type='C-svc',kernel=pre,cross=10,C=10,prob.model=F) 
  </code></pre>
  
  <p>Can anyone please comment on this, am I following the right syntax of adding weights? Also I discovered that if we use the weights with <code>prob.model=T</code> the <code>ksvm</code> function returns a error!  </p>