Beispiel #1
0
 public ONE_CLASS_Q(svm_problem prob, svm_parameter param)
   : base(prob.l, prob.x, param) {
   cache = new Cache(prob.l, (long)(param.cache_size * (1 << 20)));
   QD = new double[prob.l];
   for (int i = 0; i < prob.l; i++)
     QD[i] = kernel_function(i, i);
 }
Beispiel #2
0
 public SVR_Q(svm_problem prob, svm_parameter param)
   : base(prob.l, prob.x, param) {
   l = prob.l;
   cache = new Cache(l, (long)(param.cache_size * (1 << 20)));
   QD = new double[2 * l];
   sign = new short[2 * l];
   index = new int[2 * l];
   for (int k = 0; k < l; k++) {
     sign[k] = 1;
     sign[k + l] = -1;
     index[k] = k;
     index[k + l] = k;
     QD[k] = kernel_function(k, k);
     QD[k + l] = QD[k];
   }
   buffer = new float[2][];
   buffer[0] = new float[2 * l];
   buffer[1] = new float[2 * l];
   next_buffer = 0;
 }
Beispiel #3
0
 public SVC_Q(svm_problem prob, svm_parameter param, short[] y_)
   : base(prob.l, prob.x, param) {
   y = (short[])y_.Clone();
   cache = new Cache(prob.l, (long)(param.cache_size * (1 << 20)));
   QD = new double[prob.l];
   for (int i = 0; i < prob.l; i++)
     QD[i] = kernel_function(i, i);
 }