title: Why doesn't `predict.ksvm` predict the class labels?
body: <p>I'm trying to figure out the difference in performance between <code>ksvm</code> (kernlab) and <code>svm</code> (e1071).</p>
  <p>I'm using the spam database in the kernlab package.</p>
  <h3>Minimal working example</h3>
  <pre><code>library(&quot;kernlab&quot;)
  data(spam)
  
  ##replacing &quot;spam&quot; labels with 1 or -1
  type= ifelse(spam[,58]==&quot;spam&quot;,1,-1)
  spam &lt;- spam[,-58]
  spam &lt;- cbind(spam, type)
  
  ## create test and training set
  spam &lt;- spam[sample(1:4601),] #random permutation
  selection &lt;- 1:2300
  training &lt;- spam[selection,-58]
  training.truth &lt;- spam[selection,58]
  test &lt;- spam[-selection, -58]
  test.truth &lt;- spam[-selection, 58]
  
  ## train a support vector machine
  filter &lt;- ksvm(training.truth~.,
                 data=training,
                 kernel=&quot;rbfdot&quot;,
                 class=&quot;C-svc&quot;,
                 kpar=list(sigma=0.05),C=5)
  
  ## predict mail type on the test set
  mailtype &lt;- predict(filter,test)
  
  mailtype[1,]  ## returns -0.2459927
  </code></pre>
  <p>Why does this return <code>-0.2459927</code>, why doesn't it return the label <code>1</code> or <code>-1</code>?
  I tried adjusting some options, but none seem to work.</p>