scikit-learn/scikit-learn — pull request #1184 by jaberg (2012-09-26 19:23:16+00:00)
Title: ENH: adding iter_limit to libsvm

This commit adds support for a new libsvm parameter, which permits setting a
hard limit on the while loop in the svm.cpp file, in the Solver::Solve
function. Without this functionality, it has been observed that libsvm hangs
without converging in a reasonable time -- it can take days instead of
seconds, and perhaps it is in fact an infinite loop, I don't know. This
commit allows the user to set a hard limit on the number of libsvm iterations,
and modifies the libsvm bindings to raise a new exception of SolverTimeout
when this limit is reached.