MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / sigmoidPredict

Function sigmoidPredict

src/thundersvm/model/svc.cpp:185–192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

183}
184
185float_type sigmoidPredict(float_type dec_value, float_type A, float_type B) {
186 double fApB = dec_value * A + B;
187 // 1-p used later; avoid catastrophic cancellation
188 if (fApB >= 0)
189 return exp(-fApB) / (1.0 + exp(-fApB));
190 else
191 return 1.0 / (1 + exp(fApB));
192}
193
194void SVC::multiclass_probability(const vector<vector<float_type> > &r, vector<float_type> &p) const {
195 int nrClass = n_classes;

Callers 1

predict_labelMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected