Xtra-Computing / thundersvm

ThunderSVM: A Fast SVM Library on GPUs and CPUs
Apache License 2.0
1.56k stars 216 forks source link

Changing iteration numbers #160

Closed mahmoodn closed 4 years ago

mahmoodn commented 5 years ago

Hi, How can I change the number of global iterations? I don't see any related option here

options:
-s svm_type: set type of SVM (default 0)
    0 -- C-SVC      (multi-class classification)
    1 -- nu-SVC     (multi-class classification)
    2 -- one-class SVM
    3 -- epsilon-SVR    (regression)
    4 -- nu-SVR     (regression)
-t kernel_type: set type of kernel function (default 2)
    0 -- linear: u'*v
    1 -- polynomial: (gamma*u'*v + coef0)^degree
    2 -- radial basis function: exp(-gamma*|u-v|^2)
    3 -- sigmoid: tanh(gamma*u'*v + coef0)
-d degree: set degree in kernel function (default 3)
-g gamma: set gamma in kernel function (default 1/num_features)
-r coef0: set coef0 in kernel function (default 0)
-c cost: set the parameter C of C-SVC, epsilon-SVR, and nu-SVR (default 1)
-n nu: set the parameter nu of nu-SVC, one-class SVM, and nu-SVR (default 0.5)
-p epsilon: set the epsilon in loss function of epsilon-SVR (default 0.1)
-m memory size: constrain the maximum memory size (MB) that thundersvm uses (default 8192)
-e epsilon: set tolerance of termination criterion (default 0.001)
-b probability_estimates: whether to train a SVC or SVR model for probability estimates, 0 or 1 (default 0)
-wi weight: set the parameter C of class i to weight*C, for C-SVC (default 1)
-v n: n-fold cross validation mode
-u n: specify which gpu to use (default 0)
-o n: set the number of cpu cores to use, -1 for maximum(default -1)
-q: quiet mode

Also, is there any recommended options for data sets? For example, in breast-cancer, I get diff=nan for -c 100 -g 0.5

2019-07-30 18:41:20,852 INFO [default] global iter = 1200, total local iter = 119702395, diff = -nan

Thanks for any comment.

zeyiwen commented 5 years ago

There is no option for specifying the number of global iterations. The training stops either not being able to further improve the objective or reaching the maximum number of iterations.