2

I am training an SVC model on a large dataset, and since I have set verbose=True, it is showing a Warning: using -h 0 may be faster.

I have two questions here:

  • what is this warning and how we can set any option of libsvm as it has mentioned in the warning?
  • Does the size of cache in sklearn.svm.SVC parameter setting can affect the speed of training? I have set it as cache_size=2000 .

Your expert view is appreciated

S.EB
  • 1,966
  • 4
  • 29
  • 54

1 Answers1

2

-h parameter controls shrinking: whether to use the shrinking heuristics, 0 or 1 (default 1)

You can set it in the SVC constructor using shrinking argument. Shrinking is a heuristics to speed up the optimization problem.

Check Original Paper and Similar Quesiton on shrinking

Caching is technique for reducing the computational time of the decomposition method which is part of the training. This size is controlled via cache_size parameter.

I higlhy recommend reading the original libsm paper, especially section 5.

mujjiga
  • 16,186
  • 2
  • 33
  • 51