@@ -2,40 +2,41 @@ package libsvm
22
33const (
44/* svm_type */
5- C_SVC = 0
6- NU_SVC = 1
7- ONE_CLASS = 2
5+ C_SVC = 0
6+ NU_SVC = 1
7+ ONE_CLASS = 2
88EPSILON_SVR = 3
9- NU_SVR = 4
9+ NU_SVR = 4
1010
1111/* kernel_type */
12- LINEAR = 0
13- POLY = 1
14- RBF = 2
15- SIGMOID = 3
12+ LINEAR = 0
13+ POLY = 1
14+ RBF = 2
15+ SIGMOID = 3
1616PRECOMPUTED = 4
1717)
1818
1919type SVM_Parameter struct {
20- svm_type int
20+ svm_type int
2121kernel_type int
22- degree int // for poly
23- gamma float64 // for poly/rbf/sigmoid
24- coef0 float64 // for poly/sigmoid
22+ degree int // for poly
23+ gamma float64 // for poly/rbf/sigmoid
24+ coef0 float64 // for poly/sigmoid
2525
2626// these are for training only
27- cache_size float64 // in MB
28- eps float64 // stopping criteria
29- C float64 // for C_SVC, EPSILON_SVR and NU_SVR
30- nr_weight int // for C_SVC
31- weight_label []int // for C_SVC
32- weight []float64 // for C_SVC
33- nu float64 // for NU_SVC, ONE_CLASS, and NU_SVR
34- p float64 // for EPSILON_SVR
35- shrinking int // use the shrinking heuristics
36- probability int // do probability estimates
27+ cache_size float64 // in MB
28+ eps float64 // stopping criteria
29+ C float64 // for C_SVC, EPSILON_SVR and NU_SVR
30+ nr_weight int // for C_SVC
31+ weight_label []int // for C_SVC
32+ weight []float64 // for C_SVC
33+ nu float64 // for NU_SVC, ONE_CLASS, and NU_SVR
34+ p float64 // for EPSILON_SVR
35+ shrinking int // use the shrinking heuristics
36+ probability int // do probability estimates
3737
3838}
39+
3940func (this * SVM_Parameter ) Clone () (rst * SVM_Parameter ) {
4041rst = new (SVM_Parameter )
4142* rst = * this
0 commit comments