Skip to content

Training gets stuck on a specific dataset #225

Closed
@fumoboy007

Description

@fumoboy007

I am trying to train a C-SVC on a specific dataset. The training process gets stuck, never finishing.

Reproduction Steps

  1. Unarchive libsvm-stuck-training-issue.zip, which includes reproduction code and data. (The data has already been scaled.)
  2. Copy svm.h and svm.cpp from LIBSVM v335 (or any older version up to and including v300) to the same directory.
  3. clang++ -std=c++11 -o reproduce_issue reproduce_issue.cpp svm.cpp
  4. ./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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions