Skip to content

Commit

Permalink
Port "modifications are made for one-class svm"
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaldvogel committed Oct 25, 2020
1 parent 18175fc commit 96ab0c8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/de/bwaldvogel/liblinear/Linear.java
Expand Up @@ -1939,9 +1939,9 @@ else if (alpha[i] > 0 && alpha[j] < 1 && -Gi + 1e-12 < -Gj)
double ub = Double.POSITIVE_INFINITY, lb = Double.NEGATIVE_INFINITY, sum_free = 0;
for (i = 0; i < l; i++) {
double G_ = SparseOperator.dot(w, prob.x[i]);
if (alpha[i] == 0)
if (alpha[i] == 1)
lb = Math.max(lb, G_);
else if (alpha[i] == 1)
else if (alpha[i] == 0)
ub = Math.min(ub, G_);
else {
++nr_free;
Expand Down

0 comments on commit 96ab0c8

Please sign in to comment.