-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathsvm_model.go
More file actions
18 lines (16 loc) · 799 Bytes
/
svm_model.go
File metadata and controls
18 lines (16 loc) · 799 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
package libsvm
// SVMModel define model of svm
type SVMModel struct {
Param *SVMParameter // parameter
NrClass int // number of classes, = 2 in regression/one class svm
L int // total #SV
SV [][]SVMNode // SVs (SV[l])
SvCoef [][]float64 // coefficients for SVs in decision functions (svCoef[k-1][l])
Rho []float64 // constants in decision functions (rho[k*(k-1)/2])
ProbA []float64 // pariwise probability information
ProbB []float64
SvIndices []int // svIndices[0,...,nSV-1] are values in [1,...,numTraningData] to indicate SVs in the training set
// for classification only
Label []int // label of each class (label[k])
NSV []int // number of SVs for each class (nSV[k]) nSV[0] + nSV[1] + ... + nSV[k-1] = l
}