1
$\begingroup$

I'm a newbie in SVM, and have several questions regarding a tool in libsvm.

There's tools/grid.py which tools/README explains as "parameter selection tool for C-SVM classification using 47 the RBF (radial basis function) kernel".

I have 2 questions regarding this tool.

  1. What this tool does is: given sets of label/feature_parameters, chooses the most "efficient" and "minimum" feature_parameters by performing grid search. Am I correct?

e.g. Given a dataset like following, which the label is only dependent on param1,

label, param1, param2, param3
0    , 0     , 61    , 2     
0    , 0     , 92    , 6
1    , 1     , 10    , 32
1    , 1     , 83    , 10

If we apply grid.py to this dataset, does it tell me that most "efficient" (in the way that it precisely identifies the class of a test data) and "minimum" (in the way that only that no trivial parameters are included) parameter is param1.

  1. If the answer of the question above is YES, how can I know which parameters are efficient and minimum? I see some output files but doens't make sense for me. If it's NO, are there any de facto standard method for doing what I want?
$\endgroup$
0
$\begingroup$

Probably found the answer.


Question 1. What this tool does is: given sets of label/feature_parameters, chooses the most "efficient" and "minimum" feature_parameters by performing grid search. Am I correct?

The answer is No. grid.py performs grid search and estimates the best cost and gamma value. So it helps making SVM "efficient" anyway, but not doesn't help finding minimum set of features (well, there's no "absolute minimum" probably, because accuracy and the number of features is probably in proportion).

Question 2. If the answer of the question above is YES, how can I know which parameters are efficient and minimum? I see some output files but doesn't make sense for me. If it's NO, are there any de facto standard method for doing what I want?

There probably isn't any de facto standard method. Perhaps when deciding feature parameters, we should first take approach from domain's perspective, and then adjust them in mathematical approach. (e.g. if you're making SVM to descriminate malwares and benign apps, you should think of the behaviour and tendency of malwares, and decide the "parameter candidates" first, then apply mathematical approach like calculating average and deviation of each features.)

| cite | improve this answer | |
$\endgroup$
  • 2
    $\begingroup$ To answer to your question is no. Feature selection isn't baked into libsvm. You would have to do this separately. libsvm's grid search only attempts to optimize hyperparameters (C and gamma), nothing more. That said, there are far better ways to optimize C and gamma than grid search. $\endgroup$ – Marc Claesen Jul 15 '15 at 7:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.