a6bb4aee8fd6a45c1de2ad57a1de864c7345a554
[svrt.git] / doit.sh
1 #!/bin/bash
2
3 #  svrt is the ``Synthetic Visual Reasoning Test'', an image generator
4 #  for evaluating classification performance of machine learning
5 #  systems, humans and primates.
6 #
7 #  Copyright (c) 2009 Idiap Research Institute, http://www.idiap.ch/
8 #  Written by Francois Fleuret <francois.fleuret@idiap.ch>
9 #
10 #  This file is part of svrt.
11 #
12 #  svrt is free software: you can redistribute it and/or modify it
13 #  under the terms of the GNU General Public License version 3 as
14 #  published by the Free Software Foundation.
15 #
16 #  svrt is distributed in the hope that it will be useful, but WITHOUT
17 #  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
18 #  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
19 #  License for more details.
20 #
21 #  You should have received a copy of the GNU General Public License
22 #  along with selector.  If not, see <http://www.gnu.org/licenses/>.
23
24 nb_samples_to_save=100
25 nb_samples_for_training=1000
26
27 problem_list=$*
28
29 [[ ${problem_list} ]] || problem_list="1 2 3 5 6 8 11 12 13 17 18 20 21"
30
31 set -e
32
33 make -j -k vision_test
34
35 for problem_number in ${problem_list}; do
36
37     result_dir=./results_problem_${problem_number}/
38
39     mkdir -p ${result_dir}
40
41     ./vision_test \
42         --problem_number=${problem_number} \
43         --nb_train_samples=${nb_samples_to_save} \
44         --result_path=${result_dir} \
45         write-samples
46
47     ./vision_test \
48         --problem_number=${problem_number} \
49         --nb_train_samples=${nb_samples_for_training} \
50         --result_path=${result_dir} \
51         --progress_bar=no \
52         randomize-train adaboost compute-train-error compute-test-error | tee ${result_dir}/log
53
54 done