Software

A zip file with the matlab code used for the IJCAI-07 paper can be downloaded here. After unpacking you have a directory revac_demo/ with the following files and directories:

calibrate_ga.m A function that allows you to test REVAC on a genetic algorithm
calibrate_test.m A function that allows you to test REVAC on artificial problems
ga_tools/ Functions for the genetic test algorithm
init.m A function that adds lib_revac/ and lib_revac/tools/ to the Matlab path
lib_revac/ All necessary files that handle the data structures manipulated by REVAC. Special help functions can be found in lib_revac/tools/
revac.m A simple entry function to use the REVAC method

If you want to include the REVAC files in your own experiment you have to add the files to your matlab path:

addpath lib_revac;
addpath lib_revac/tools;

An easy way to use the REVAC method is by using the supplied function revac.m. It takes one mandatory argument: a function handle of the form y = f(x,i) that specifies the application to which the parameters are tuned. A second optional argument gives the REVAC data structure. This is useful when some default settings need to be changed, or when a search needs to be continued after an interruption. A third optional argument specifies the number of parameters to be tuned (i.e., numel(x)). If absent, this number will be inferred from the data structure supplied in the second argument, and be set to 1 if that is not possible. The function will output a data structure with the results of the search, and will also produce a number of plots with graphical results.

To give an example, we use a simple function where some parameters are more relevant than others:


cd revac_demo;
init;
f = @(x,i) sum(rand(9,1) * (0:8) * (0.5- x)); % SPECIFIES THE APPLICATION PROBLEM f()
my_search = revac(f, [], 9); % TUNES 9 PARAMETERS TO f()
revac_show(my_search); % GIVES GRAFICAL OUTPUT

Understanding the function handle y = f(x,i) is key to using the REVAC library. It takes two arguments. The first is an array with a possible solution, scaled to the range [0,1]. The function has to convert this array into suitable values for the calibration problem, evaluate it, and return a value that expresses the performance. REVAC tries to maximize this value. The second argument is a three value array that allows the function to see how advanced REVAC is in the search. The three values are the index of the current solution, replication and calibration. i=[225,2,3] means that this is the second replication of the 225th value when calibrating the problem for the third time. For most purposes this can savely be ignored. The output of y = f(x,i) can be a scalar or an array. In the last case REVAC tries to maximize each output value with equal weight.

To reproduce some of the tests of the IJCAI-07 paper enter for example calibrate_test(9, 5);. This will run REVAC with default values on the hierarchical test problem from the IJCAI-07 paper. It will calibrate 9 parameters and it will use a moderate noise level of 1. At the end of the calibration 7 graphs will pop up.

AttachmentSize
revac_demo.zip39.46 KB