diff --git a/openbr/plugins/svm.cpp b/openbr/plugins/svm.cpp index a6ff7b9..049719b 100644 --- a/openbr/plugins/svm.cpp +++ b/openbr/plugins/svm.cpp @@ -161,7 +161,8 @@ private: dst.m().at(0, 0) = prediction; // positive values ==> first class // negative values ==> second class - prediction = prediction > 0 ? 0 : 1; + if (type != EPS_SVR && type != NU_SVR) + prediction = prediction > 0 ? 0 : 1; } if (type == EPS_SVR || type == NU_SVR) dst.file.set(outputVariable, prediction);