######################################################################## Bayesian Support Vector Machines for Regression and Binary Classification v4.5 Chu Wei (C)Copyright 2001-2005 at COME Lab. and Gatsby Unit. Last update on 23/09/2005 ######################################################################## SOURCE CODE: http://www.gatsby.ucl.ac.uk/~chuwei/code/bisvm.tar ######################################################################## 1. Installation a) download bisvm.tar to your machine (Linux is assumed) b) tar -xvf bisvm.tar c) cd bisvm d) g++ -o bisvm *.cpp -lm -O2 -Wall c) the program bisvm is ready for use. 2. Data Format a) a space delimited plain text file with a new-line character at the end of each line b) each line contains one sample. c) In the training data file, the last element of each line must be the target. If there are only two kinds of targets, we assume it is a binary classification problem. For more than two targets, we assume it is a metric regression problem. e) training data saved in a text file, say "mytask_train.1". f) the data for test with/without targers saved in "mytask_test.1". g) test targets could be saved in "mytask_targets.1" if available. h) "mytask" could be any string followed by "_train" and "_test". i) see the example files under the folder: robot_train.1 and robot_test.1(with targets); robot_train.2 and robot_test.2 (without targets, robot_targets.2 is optional). 3. Input and Output a) prepare your data files "mytask_train.0" "mytask_test.0" "mytask_targets.0" (optional) b) run the program ./bisvm mytask_train.0 c) output files 1) "mytask_cguess.0" to save predictive targets for test data (+1/-1 for binary classification). 2) "mytask_errorbar.0" to save sqrt(variance) of predictive distribution of test data. (for binary classification, you can find the mean and the sqrt(variance) of predictive distribution at each line along with the probability y=+1.) 3) "mytask_train.0_expert_1.log" to save the optimal settings of the predictive model, including kernel parameters and the noise level. 4) "mytask_alpha.0" to save the optimal alpha parameters. 5) "batch.log" to save results for batch tasks, including zero-one error, absolute error, mean absolute error and CPU time consumed in seconds. d) if you have a BATCH of tasks, prepare your data files as "mytask_train.0" "mytask_test.0" "mytask_targets.0"(optional), "mytask_train.1" "mytask_test.1" "mytask_targets.1"(optional), "mytask_train.2" "mytask_test.2" "mytask_targets.2"(optional), ... ... the program bisvm would make them done one by one. the results of these files are saved in "batch.log". 4. Options a) for help information ./bisvm b) switch on ARD kernel ./bisvm -a mytask_train.0 c) keep the output original (default normalized) ./bisvm -o mytask_train.0 d) keep the input vector original (default normalized) ./bisvm -i mytask_train.0 e) specify the beta parameter at 1.0(regression only, default 0.3) ./bisvm -B 1.0 mytask_train.0 f) specify the linear kernel ./bisvm -P 1 mytask_train.0 g) want more messages ./bisvm -v mytask_train.0 5. Reference 1) "Bayesian support vector regression using a unified loss function", Chu, W. and S. S. Keerthi and C. J. Ong, IEEE Transaction on Neural Networks, 2004 http://www.gatsby.ucl.ac.uk/~chuwei/paper/bisvr.pdf 2) "Bayesian trigonometric support vector classifier" Chu, W. and S. S. Keerthi and C. J. Ong, Neural Computation, 2003 http://www.gatsby.ucl.ac.uk/~chuwei/paper/btsvc.pdf ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~