ThunderSVM
ThunderSVM: An Open-Source SVM Library on GPUs and CPUs
svmparam.h
1 //
2 // Created by jiashuai on 17-9-21.
3 //
4 
5 #ifndef THUNDERSVM_SVMPARAM_H
6 #define THUNDERSVM_SVMPARAM_H
7 
8 #include "thundersvm.h"
9 
13 struct SvmParam {
14  SvmParam() {
15  svm_type = C_SVC;
16  kernel_type = RBF;
17  C = 1;
18  gamma = 0;
19  p = 0.1;
20  epsilon = 0.001;
21  nu = 0.5;
22  probability = false;
23  nr_weight = 0;
24  }
25 
27  enum SVM_TYPE {
28  C_SVC, NU_SVC, ONE_CLASS, EPSILON_SVR, NU_SVR
29  };
31  enum KERNEL_TYPE {
32  LINEAR, POLY, RBF, SIGMOID/*, PRECOMPUTED*/
33  };
34  SVM_TYPE svm_type;
35  KERNEL_TYPE kernel_type;
36 
38  float_type C;
40  float_type gamma;
42  float_type p;
44  float_type nu;
46  float_type epsilon;
48  int degree;
50  float_type coef0;
52  int nr_weight;
56  float_type *weight;
59  static const char *kernel_type_name[6];
60  static const char *svm_type_name[6];
61 };
62 #endif //THUNDERSVM_SVMPARAM_H
int nr_weight
for SVC
Definition: svmparam.h:52
int probability
do probability estimates
Definition: svmparam.h:58
int degree
degree for polynomial kernel
Definition: svmparam.h:48
KERNEL_TYPE
kernel function type
Definition: svmparam.h:31
float_type epsilon
stopping criteria
Definition: svmparam.h:46
float_type * weight
for SVC
Definition: svmparam.h:56
float_type gamma
for RBF kernel
Definition: svmparam.h:40
float_type p
for regression
Definition: svmparam.h:42
float_type C
regularization parameter
Definition: svmparam.h:38
float_type coef0
for polynomial/sigmoid kernel
Definition: svmparam.h:50
int * weight_label
for SVC
Definition: svmparam.h:54
params for ThunderSVM
Definition: svmparam.h:13
float_type nu
for -SVM
Definition: svmparam.h:44
SVM_TYPE
SVM type.
Definition: svmparam.h:27