From 8eafb077671e35bcd1a7eccd971e280db42e9aeb Mon Sep 17 00:00:00 2001 From: Josh Klontz Date: Fri, 11 Apr 2014 17:20:22 -0400 Subject: [PATCH] don't booleanize regression values --- openbr/plugins/svm.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- libgit2 0.21.4