I use liblinear with my program to perform multi-class classification with the L2R_L2LOSS_SVC_DUAL
solver. In the current test-setup I have 1600 instances from a total of 9 classes with 1000 features each.
I'm trying to determine the optimal C parameter for training with 5-fold cross-validation, but even with a small C of 1.0 liblinear reaches the maximal number of iterations:
................................................................................
....................
optimization finished, #iter = 1000
WARNING: reaching max number of iterations
Using -s 2 may be faster (also see FAQ)
Objective value = -637.100923
nSV = 783
The FAQ site mentions two possible reasons for this:
- Data isn't scaled.
- A large C parameter is used.
- A lot of instances with a small number of features is used, so that the solver
L2R_L2LOSS_SVC
may be faster.
Neither one applies to my case. Since my feature vector is some kind of histogram, there is a natural maximum, that I use to scale the features to [0,1].
I set up the parameteres for liblinear as follows:
struct parameter svmParams;
svmParams.solver_type = L2R_L2LOSS_SVC_DUAL;
svmParams.eps = 0.1;
svmParams.nr_weight = 0;
svmParams.weight_label = NULL;
svmParams.weight = NULL;
svmParams.p = 0.1;
svmParams.C = 1.0;
My question is: What other reasons, not mentioned in the FAQ, may cause liblinear to operate slow in this scenario and what may I do against it?