Skip to content

Commit a2b7cdb

Browse files
committed
Fix bug where we used int instead of double to calculate the regression error.
1 parent a41ad04 commit a2b7cdb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gate/plugin/learningframework/engines/EngineLibSVM.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -440,8 +440,8 @@ public EvaluationResult evaluate(String algorithmParameters,
440440
double target[] = new double[svmprob.l];
441441

442442
libsvm.svm.svm_cross_validation(svmprob, svmparms, numberOfFolds, target);
443-
int sumSquared = 0;
444-
int sumAbsolute = 0;
443+
double sumSquared = 0;
444+
double sumAbsolute = 0;
445445
int nTotal = 0;
446446
for(int i=0; i<target.length; i++) {
447447
double diff = target[i] - svmprob.y[i];

0 commit comments

Comments
 (0)