Commit 8eafb077671e35bcd1a7eccd971e280db42e9aeb

Authored by Josh Klontz
1 parent 80f426dc

don't booleanize regression values

Showing 1 changed file with 2 additions and 1 deletions
openbr/plugins/svm.cpp
@@ -161,7 +161,8 @@ private: @@ -161,7 +161,8 @@ private:
161 dst.m().at<float>(0, 0) = prediction; 161 dst.m().at<float>(0, 0) = prediction;
162 // positive values ==> first class 162 // positive values ==> first class
163 // negative values ==> second class 163 // negative values ==> second class
164 - prediction = prediction > 0 ? 0 : 1; 164 + if (type != EPS_SVR && type != NU_SVR)
  165 + prediction = prediction > 0 ? 0 : 1;
165 } 166 }
166 if (type == EPS_SVR || type == NU_SVR) 167 if (type == EPS_SVR || type == NU_SVR)
167 dst.file.set(outputVariable, prediction); 168 dst.file.set(outputVariable, prediction);