I am trying to train a C-SVC on a specific dataset. The training process gets stuck, never finishing.
Reproduction Steps
- Unarchive libsvm-stuck-training-issue.zip, which includes reproduction code and data. (The data has already been scaled.)
- Copy
svm.h and svm.cpp from LIBSVM v335 (or any older version up to and including v300) to the same directory.
clang++ -std=c++11 -o reproduce_issue reproduce_issue.cpp svm.cpp
./reproduce_issue
Preliminary Investigation
- The issue is not reproducible after reverting 1c80a42, though I’m not sure why. Similarly, changing
typedef float Qfloat to typedef double Qfloat causes the issue to go away. This could be a red herring.
- After adding some logging to
Solver::select_working_set, I can see that the training process eventually gets stuck on the working set {1525, 2023}, repeatedly selecting these two indices for i and j but with alternating order.
My hunch is that there is a bug in the working set selection or the stopping criteria. I will leave it to the experts to investigate further!
I am trying to train a C-SVC on a specific dataset. The training process gets stuck, never finishing.
Reproduction Steps
svm.handsvm.cppfrom LIBSVM v335 (or any older version up to and including v300) to the same directory.clang++ -std=c++11 -o reproduce_issue reproduce_issue.cpp svm.cpp./reproduce_issuePreliminary Investigation
typedef float Qfloattotypedef double Qfloatcauses the issue to go away. This could be a red herring.Solver::select_working_set, I can see that the training process eventually gets stuck on the working set{1525, 2023}, repeatedly selecting these two indices foriandjbut with alternating order.My hunch is that there is a bug in the working set selection or the stopping criteria. I will leave it to the experts to investigate further!