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:
sklearn.svm.SVC
parameter setting can affect the speed of training? I have set it as cache_size=2000
. Your expert view is appreciated
-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.