@Override public double predict(SVMExample sVMExample){
  int i;
  int[] sv_index;
  double[] sv_att;
  double the_sum=examples.get_b() + kernel.calculate_K(sVMExample,sVMExample);
  double alpha;
  for (i=0; i < examples_total; i++) {
    alpha=alphas[i];
    if (alpha != 0) {
      sv_index=examples.index[i];
      sv_att=examples.atts[i];
      the_sum-=2 * alpha * kernel.calculate_K(sv_index,sv_att,sVMExample.index,sVMExample.att);
    }
    ;
  }
  ;
  if (the_sum < 0) {
    the_sum=0;
  }
  ;
  return Math.sqrt(the_sum);
}

@ Override public double predict ( SVMExample sVMExample ) { int i ; int [ ] sv_index ; double [ ] sv_att ; double the_sum = examples . get_b ( ) + kernel . calculate_K ( sVMExample , sVMExample ) ; double alpha ; for ( i = 0 ; i < examples_total ; i ++ ) { alpha = alphas [ i ] ; if ( alpha != 0 ) { sv_index = examples . index [ i ] ; sv_att = examples . atts [ i ] ; the_sum -= 2 * alpha * kernel . calculate_K ( sv_index , sv_att , sVMExample . index , sVMExample . att ) ; } ; } ; if ( the_sum < 0 ) { the_sum = 0 ; } ; return Math . sqrt ( the_sum ) ; }
predict a single example
