liblinear怎么使用grid.py搜索

在liblinear文档上发现了方法:

http://www.csie.ntu.edu.tw/~cjlin/liblinear/FAQ.html


Q: How to select the regularization parameter C?

You can usegrid.py of LIBSVM (after version 3.16) to check cross validation accuracy ofdifferent C. Two options must be specified.

  1. `-svmtrain train': use the command `train' of LIBLINEAR
  1. `-log2g null': do not grid with `g'

For example, you canrun

> pythongrid.py -log2c -3,0,1 -log2g null -svmtrain./train heart_scale

to check CV values atC=2^-3, 2^-2, 2^-1, and 2^0.

 

来自 <http://www.csie.ntu.edu.tw/~cjlin/liblinear/FAQ.html>

 

即把liblineartrain执行程序设置为grid的参数

你可能感兴趣的:(liblinear怎么使用grid.py搜索)