diff --git a/JSAT/src/jsat/classifiers/svm/PlattSMO.java b/JSAT/src/jsat/classifiers/svm/PlattSMO.java index be9adff2..511a3211 100644 --- a/JSAT/src/jsat/classifiers/svm/PlattSMO.java +++ b/JSAT/src/jsat/classifiers/svm/PlattSMO.java @@ -333,17 +333,21 @@ private void trainC_warm_and_normal(ClassificationDataSet dataSet, Classifier wa updateSetsLabeled(i, alphas[i], C*weights.get(i)); if(label[i] == -1) + { if(I0[i] && (i_low == -1 || fcache[i] > fcache[i_low]) ) { i_low = i; b_low = fcache[i]; } + } else + { if(I0[i] && (i_low == -1 || fcache[i] > fcache[i_up]) ) { i_up = i; b_up = fcache[i]; } + } } }