Commit fa6974f80b34558aac00942a7eae7de8e3322dff

Authored by Josh Klontz
2 parents 4f3488f0 eaf01fc8

Merge pull request #244 from biometrics/svmInitChange

Change default behavior of svm transform to better support svr
Showing 1 changed file with 1 additions and 13 deletions
openbr/plugins/svm.cpp
@@ -122,7 +122,7 @@ private: @@ -122,7 +122,7 @@ private:
122 BR_PROPERTY(Type, type, C_SVC) 122 BR_PROPERTY(Type, type, C_SVC)
123 BR_PROPERTY(float, C, -1) 123 BR_PROPERTY(float, C, -1)
124 BR_PROPERTY(float, gamma, -1) 124 BR_PROPERTY(float, gamma, -1)
125 - BR_PROPERTY(QString, inputVariable, "") 125 + BR_PROPERTY(QString, inputVariable, "Label")
126 BR_PROPERTY(QString, outputVariable, "") 126 BR_PROPERTY(QString, outputVariable, "")
127 BR_PROPERTY(bool, returnDFVal, false) 127 BR_PROPERTY(bool, returnDFVal, false)
128 128
@@ -186,18 +186,6 @@ private: @@ -186,18 +186,6 @@ private:
186 186
187 void init() 187 void init()
188 { 188 {
189 - // Since SVM can do regression or classification, we have to check the problem type before  
190 - // specifying target variable names  
191 - if (inputVariable.isEmpty())  
192 - {  
193 - if (type == EPS_SVR || type == NU_SVR) {  
194 - inputVariable = "Regressor";  
195 - if (outputVariable.isEmpty())  
196 - outputVariable = "Regressand";  
197 - }  
198 - else  
199 - inputVariable = "Label";  
200 - }  
201 if (outputVariable.isEmpty()) 189 if (outputVariable.isEmpty())
202 outputVariable = inputVariable; 190 outputVariable = inputVariable;
203 } 191 }