MCPcopy Create free account
hub / github.com/datastream/libsvm / sigmoid_predict

Method sigmoid_predict

svm.go:1636–1645  ·  view source on GitHub ↗
(decision_value, A, B float64)

Source from the content-addressed store, hash-verified

1634}
1635
1636func (this *SVM) sigmoid_predict(decision_value, A, B float64) float64 {
1637 var rst float64
1638 fApB := decision_value*A + B
1639 if fApB >= 0 {
1640 rst = math.Exp(-fApB) / (1.0 + math.Exp(-fApB))
1641 } else {
1642 rst = 1.0 / (1 + math.Exp(fApB))
1643 }
1644 return rst
1645}
1646
1647func (this *SVM) multiclass_probability(k int, r [][]float64, p []float64) {
1648 var t, j int

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected