30 params = [random.gauss(param_mu, param_sig)
for x
in range(0, D)]
32 comment =
"# Params: " 33 comment +=
" ".
join(map(str,params))
36 print(
"# D = " + str(D) +
", N = " + str(N) +
", SEED = " + str(SEED))
39 x = [random.uniform(minx, maxx)
for x
in range(0,D)]
40 string =
" ".
join(map(str,x)) +
" " 43 value += x[d] * params[d]
44 value *= random.gauss(noise_mu, noise_sig)
45 value += random.gauss(0, noise_add_sig)
46 print(string + str(value))
std::string join(char glue, const std::vector< std::string > &parts)
Join a vector of strings by some glue character between each pair from the sequence.