(decision_value, A, B float64)
| 1634 | } |
| 1635 | |
| 1636 | func (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 | |
| 1647 | func (this *SVM) multiclass_probability(k int, r [][]float64, p []float64) { |
| 1648 | var t, j int |
no outgoing calls
no test coverage detected