174 std::size_t ic = matrix.size();
175 double upper = 1.0/(
m_nu*ic);
176 SVMProblemType svmProblem(matrix,blas::repeat(0.0,ic),0.0,upper);
182 column(svm.
alpha(),0)= problem.getUnpermutedAlpha();
185 double lowerBound = -1e100;
186 double upperBound = 1e100;
188 std::size_t freeVars = 0;
189 for (std::size_t i=0; i != problem.dimensions(); i++)
191 double value = problem.gradient(i);
192 if (problem.alpha(i) == 0.0)
193 lowerBound = std::max(value,lowerBound);
194 else if (problem.alpha(i) == upper)
195 upperBound = std::min(value,upperBound);
203 svm.
offset(0) = sum / freeVars;
205 svm.
offset(0) = 0.5 * (lowerBound + upperBound);