* bugfixed on test_cov_parameters

This commit is contained in:
Caner Candan 2010-09-10 17:04:02 +02:00
commit 492451f247
2 changed files with 9 additions and 5 deletions

View file

@ -1,4 +1,5 @@
#include <sstream>
#include <iomanip>
#include <eo>
#include <mo>
@ -31,12 +32,14 @@ int main(int ac, char** av)
AtomType mean_value = parser.createParam((AtomType)0, "mean", "Mean value", 'm', section).value(); // m
AtomType covar1_value = parser.createParam((AtomType)1, "covar1", "Covar value 1", '1', section).value();
AtomType covar1_value = parser.createParam((AtomType)1.0, "covar1", "Covar value 1", '1', section).value();
AtomType covar2_value = parser.createParam((AtomType)0.5, "covar2", "Covar value 2", '2', section).value();
AtomType covar3_value = parser.createParam((AtomType)1, "covar3", "Covar value 3", '3', section).value();
AtomType covar3_value = parser.createParam((AtomType)1.0, "covar3", "Covar value 3", '3', section).value();
std::ostringstream ss;
ss << p_size << "_" << mean_value << "_" << covar1_value << "_" << covar2_value << "_" << covar3_value << "_gen";
ss << p_size << "_" << fixed << setprecision(1)
<< mean_value << "_" << covar1_value << "_" << covar2_value << "_"
<< covar3_value << "_gen";
std::string gen_filename = ss.str();
if (parser.userNeedsHelp())

View file

@ -2,7 +2,7 @@
PSIZE = 10000
MEAN = 0
CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters"
CMD = "./test/t-doEstimatorNormalMulti -P=%s -m=%.1f -1=%.1f -2=%.1f -3=%.1f && ./gplot.py -r TestResPop -p -w 5 -u -g %s -G results_for_test_cov_parameters -f %s_gen1"
from os import system
from numpy import arange
@ -12,6 +12,7 @@ if __name__ == '__main__':
for p1 in list(arange(0.1, 1.1, 0.1)):
for p2 in list(arange(-1., 0., 0.1)) + list(arange(0., 1.1, 0.1)):
for p3 in list(arange(0.1, 1.1, 0.1)):
cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3) )
gen = '%d_%.1f_%.1f_%.1f_%.1f' % (PSIZE, MEAN, p1, p2, p3)
cmd = CMD % ( PSIZE, MEAN, p1, p2, p3, gen, gen )
print cmd
system( cmd )