开发工具:
文件大小: 411kb
下载次数: 0
上传时间: 2010-06-20
详细说明: Libsvm is a simple, easy-to-use, and efficient software for SVM classification and regression. It solves C-SVM classification, nu-SVM classification, one-class-SVM, epsilon-SVM regression, and nu-SVM regression. It also provides an automatic model selection tool for C-SVM classification. This document explains the use of libsvm. Libsvm is available at http://www.csie.ntu.edu.tw/~cjlin/libsvm Please read the COPYRIGHT file before using libsvm. Table of Contents ================= - Quick Start - Installation and Data Format - ` svm-train' Usage - `svm-predict' Usage - Tips on Practical Use - Examples - Precomputed Kernels - Library Usage - Java Version - Building Windows Binaries - Additional Tools: Model Selection, Sub-sampling, etc. - Python Interface - Additional Information Quick Start =========== If you are new to SVM and if the data is not large, please go to `tools' directory and use easy.py after installation. It does everything automatic -- from data scaling to parameter selection. Usage: easy.py training_file [testing_file] More information about parameter selection can be found in tools/README. Installation and Data Format ============================ On Unix systems, type `make' to build the `svm-train' and `svm-predict' programs. Run them without arguments to show the usages of them. On other systems, consult `Makefile' to build them (e.g., see 'Building Windows binaries' in this file) or use the pre-built binaries (Windows binaries are in the directory `windows'). The format of training and testing data file is: : : ... . . . For classification, is an integer indicating the class label (multi-class is supported). For regression, is the target value which can be any real number. For one-class SVM, it's not used so can be any number. Except using precomputed kernels (explained in another section), : gives a feature (attribute) value. is an integer starting from 1 and is a real number. Indices must be in an ASCENDING order. Labels in the testing file are only used to calculate accuracy or errors. If they are unknown, just fill the first column with any numbers. A sample classification data included in this package is `heart_scale'. Type `svm-train heart_scale', and the program will read the training data and output the model file `heart_scale.model'. If you have a test set called heart_scale.t, then type `svm-predict heart_scale.t heart_scale.model output' to see the prediction accuracy. The `output' file contains the predicted class labels. There are some other useful programs in this package. svm-scale: This is a tool for scaling input data file. svm-toy: This is a simple graphical interface which shows how SVM separate data in a plane. You can click in the window to draw data points. Use "change" button to choose class 1, 2 or 3 (i.e., up to three classes are supported), "load" button to load data from a file, "save" button to save data to a file, "run" button to obtain an SVM model, and "clear" button to clear the window. You can enter options in the bottom of the window, the syntax of options is the same as `svm-train'. Note that "load" and "save" consider data in the classification but not the regression case. Each data point has one label (the color) which must be 1, 2, or 3 and two attributes (x-axis and y-axis values) in [0,1]. Type `make' in respective directories to build them. You need Qt library to build the Qt version. (available from http://www.trolltech.com) You need GTK+ library to build the GTK version. (available from http://www.gtk.org) We use Visual C++ to build the Windows version. The pre-built Windows binaries are in the windows directory. `svm-train' Usage ================= Usage: svm-train [options] training_set_file [model_file] options: -s svm_type : set type of SVM (default 0) 0 -- C-SVC 1 -- nu-SVC 2 -- one-class SVM 3 -- epsilon-SVR 4 -- nu-SVR -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) 4 -- precomputed kernel (kernel values in training_set_file) -d degree : set degree in kernel function (default 3) -g gamma : set gamma in kernel function (default 1/k) -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 cachesize : set cache memory size in MB (default 100) -e epsilon : set tolerance of termination criterion (default 0.001) -h shrinking: whether to use the shrinking heuristics, 0 or 1 (default 1) -b probability_estimates: whether to train an SVC or SVR model for probability estimates, 0 or 1 (default 0) -wi weight: set the parameter C of class i to weight*C in C-SVC (default 1) -v n: n-fold cross validation mode The k in the -g option means the number of attributes in the input data. option -v randomly splits the data into n parts and calculates cross validation accuracy/mean squared error on them. `svm-predict' Usage =================== Usage: svm-predict [options] test_file model_file output_file options: -b probability_estimates: whether to predict probability estimates, 0 or 1 (default 0); for one-class SVM only 0 is supported model_file is the model file generated by svm-train. test_file is the test data you want to predict. svm-predict will produce output in the output_file. Tips on Practical Use ===================== * Scale your data. For example, scale each attribute to [0,1] or [-1,+1]. * For C-SVC, consider using the model selection tool in the tools directory. * nu in nu-SVC/one-class-SVM/nu-SVR approximates the fraction of training errors and support vectors. * If data for classification are unbalanced (e.g. many positive and few negative), try different penalty parameters C by -wi (see examples below). * Specify larger cache size (i.e., larger -m) for huge problems. Examples ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除 .
本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度 。
本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版 进行解压.
如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们 .
下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们 ,经确认后退回积分.
如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.