######################################################################## Gaussian Processes for Ordinal Regression v1.0 --- MAP and Laplace Approximation --- Expectation Propagation and Variational Lower Bound Chu Wei (C)Copyright 2002-2005 at Gatsby Unit. updated on 2005/06/13 to improve numerical stability. last updated on 2005/08/19 to fix data order. ######################################################################## SOURCE CODE :-) http://www.gatsby.ucl.ac.uk/~chuwei/code/gpor.tar ######################################################################## 1. Installation a) download gpor.tar to your machine (Linux is assumed) b) tar -xvf gpor.tar c) cd gpor d) gcc -o gpor *.c -lm -O2 -Wall e) "MAP and Lap. Approx" with inear kernel is generated as default f) the program of "EP and Variational methods" is generated by gcc -o gpor_ep *.c -lm -O2 -Wall -D _GPOR_EPEM g) the program using ARD kernel is generated by gcc -o gpor_ard *.c -lm -O2 -Wall -D _GPOR_ARD h) the program of "EP and Variational methods" and ARD kernel is generated by gcc -o gpor_epard *.c -lm -O2 -D _GPOR_ARD -D _GPOR_EPEM 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) On each line, the last element is the target, integers from 1 to rank R; other elements are of the input vector. d) the samples are sorted in ascending order by their ranks. 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) the test targets are 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: mytask_train.1, mytask_test.1 and mytask_targets.1. 3. Input and Output a) prepare your data files "mytask_train.0" "mytask_test.0" "mytask_targets.0" (optional) b) run the program ./gpor mytask_train.0 c) Laplace Approx will be done for model selection as default. d) output files 1) "mytask_test.0.guess" to save predictive ordinal scales for test data, integers from 1 to R. 2) "mytask_test.0.conf" to save the variance of predictive distribution of test data. 3) "mytask_test.0.func" to save the mean of predictive distribution of test data. 4) "mytask_test.0.prob" to save the predictive probability of ordinal scales of test data. 5) "mytask_train.0.log" to save the optimal settings of the Gaussian process model, including kernel parameters, noise level and thresholds. 6) "mytask_train.0.ard" to save the optimal ARD parameters if ARD kernel was used. 7) "gpor_lap_batch.log"/"gpor_epem_batch.log" to save results for batch tasks, including zero-one error, absolute error, mean absolute error and CPU time consumed in seconds. e) 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 script program "gporbatch.sh" would make them done one by one. the results of these files are saved in "gpor_lap_batch.log" or "gpor_epem_batch.log" accordingly. 4. Options a) for help information ./gpor b) specify initial noise variance, say 0.4 ./gpor -S 0.4 mytask_train.0 c) specify initial kernel parameter, say 0.01 ./gpor -K 0.01 mytask_train.0 d) specify to use Gaussian kernel (default Linear kernel) ./gpor -G mytask_train.0 e) specify the power level, say 3.0 ./gpor -O 3 mytask_train.0 5. Reference "Gaussian processes for ordinal regression", Chu, W and Z. Ghahramani, JMLR, 2005 http://www.gatsby.ucl.ac.uk/~chuwei/paper/gpor.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. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~