⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 readme

📁 svm的实现源码
💻
字号:
Two things are provided in this directory: an automatic model selectiontool and a python binding for libsvm.		Part I: Model Selection ToolsIntroduction===============grid.py is a model selection tool for C-SVM classification using rbf(radial basis function) kernel. It uses cross validation (CV) techniqueto estimate the accuracy of each parameter combination in the specified range and helps you to decide the best parameters for your problem.grid.py directly executes libsvm binaries (so no python binding is needed)for cross validation and then draw contour of CV accuracy using gnuplot.You must have libsvm and gnuplot installed before using it. The package gnuplot is available at http://www.gnuplot.info/Usage: grid.py [-log2c begin,end,step] [-log2g begin,end,step] [-v fold]        [-svmtrain pathname] [-gnuplot pathname] [-out pathname] [-png pathname]         [additional parameters for svm-train] datasetThe program conducts v-fold cross valiation using parameter C (and gamma) = 2^begin, 2^(begin+step), ..., 2^end. You can specify where the libsvm executable and gnuplot are using the-svmtrain and -gnuplot parameters.For windows users, if you are using gnuplot 3.7.1, please upgrade to version3.7.3. The pgnuplot.exe in version 3.7.1 has a bug.Example=======> python grid.py -log2c -5,5,1 -log2g -4,0,1 -v 5 -m 300 heart_scale(Windows users might also use "start grid.py" instead of "python grid.py")Output: two filesdataset.png: the contour plot of the CV accuracy (generated by gnuplot)dataset.out: the log of accuracy at each (C,gamma)Parallel grid search (experimental)===================================You can conduct a parallel grid search by dispatching jobs to a cluster of computers which share the same file system. First, you add machine names in grid.py:telnet_workers = ["linux1", "linux5", "linux5"]The same machine (e.g., linux5 here) can be listed more than once ifit has multiple CPUs or has more RAM. If the local machine is thebest, you can also enlarge the nr_local_worker. For example:nr_local_worker = 2Example:> python grid.py heart_scalePassword: ********login ok linux1login ok linux5login ok linux5...The password is the one used for entering your system. If -log2c, -log2g, or-v is not specified, defaule values are used. If your system uses ssh instead of telnet, you should setup ssh first so thatthe authentication works without asking a password, and list the computer namesin ssh_workers.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -