Definition at line 220 of file svm.cpp. References clone(), dot(), kernel_function, kernel_linear(), kernel_poly(), kernel_rbf(), kernel_sigmoid(), kernel_type, POLY, RBF, SIGMOID, SVM_LINEAR, x, and x_square. 00221 :kernel_type(param.kernel_type), degree(param.degree), 00222 gamma(param.gamma), coef0(param.coef0) 00223 { 00224 switch(kernel_type) 00225 { 00226 case SVM_LINEAR: 00227 kernel_function = &Kernel::kernel_linear; 00228 break; 00229 case POLY: 00230 kernel_function = &Kernel::kernel_poly; 00231 break; 00232 case RBF: 00233 kernel_function = &Kernel::kernel_rbf; 00234 break; 00235 case SIGMOID: 00236 kernel_function = &Kernel::kernel_sigmoid; 00237 break; 00238 } 00239 00240 clone(x,x_,l); 00241 00242 if(kernel_type == RBF) 00243 { 00244 x_square = new double[l]; 00245 for(int i=0;i<l;i++) 00246 x_square[i] = dot(x[i],x[i]); 00247 } 00248 else 00249 x_square = 0; 00250 }
Here is the call graph for this function:
|