In this readme is explained how to run the experiments needed for the
signal-to-noise ratio plot in:
H. Valpola, T. stman and J. Karhunen
"Nonlinear independent factor analysis by hierarchical models"
ICA2003

You need the Bayes Blocks library from
http://www.cis.hut.fi/projects/bayes/
and have the environment variable PYTHONPATH to point to the
installation for running these experiments.

To get a list of possible parameters to use with runhnfa type
%  python runhnfa.py --help

To run one experiment (each experiment takes several hours to run)
% mkdir experiments
% cd experiments
% python ../runhnfa.py -p nl1 -n8 -i10000 -s0 -l22

All the experiment used for the signal-to-noise ratio plot are listed
in file 'all_runs'.

To calculate signal-to-noise ratio to all results in experiments directory:
% cd experiments
% python ../calculate_corrs.py

This will save the results to cost_snr.asc. First column is the value
of the cost function and the second is the signal-to-noise ratio. The
following matlab commands makes the signal-to-noise ratio plot.

load cost_snr.asc
fonts=16;markers=16;
plot(cost_snr(:,1)/1000,cost_snr(:,2),'.','MarkerSize',markers);
xlabel('Cost / 1000','FontSize',fonts);
ylabel('SNR / dB','FontSize',fonts);
set(gca,'FontSize',fonts);

