MCPcopy Create free account
hub / github.com/PointCloudLibrary/pcl / sigmoid_predict

Function sigmoid_predict

ml/src/svm.cpp:2102–2111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2100}
2101
2102static double
2103sigmoid_predict(double decision_value, double A, double B)
2104{
2105 double fApB = decision_value * A + B;
2106 // 1-p used later; avoid catastrophic cancellation
2107
2108 if (fApB >= 0)
2109 return std::exp(-fApB) / (1.0 + std::exp(-fApB));
2110 return 1.0 / (1 + std::exp(fApB));
2111}
2112
2113// Method 2 from the multiclass_prob paper by Wu, Lin, and Weng
2114static void

Callers 1

svm_predict_probabilityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected