diff options
Diffstat (limited to 'experiments/process.py')
| -rw-r--r-- | experiments/process.py | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/experiments/process.py b/experiments/process.py index 1b84d35..b5e0d6d 100644 --- a/experiments/process.py +++ b/experiments/process.py @@ -12,15 +12,16 @@ if __name__ == "__main__": root_victims, victims, non_victims, age = load(open(sys.argv[1])) # alphas = 1. / np.arange(1000., 10000., 50.) # parameter of the time component - # deltas = np.arange(0.01, 0.5, 0.03) # parameter of the structural component - # with open("out.log", "w") as fh: - # for alpha, delta in product(alphas, deltas): - # beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta) - # print "\t".join(map(str, [1/alpha, delta, beta, roots, ll])) - # fh.write("\t".join(map(str, [alpha, delta, beta, roots, ll])) + "\n") - # fh.flush() + alphas = np.logspace(-2,2,num=5) + deltas = np.logspace(-10,-1,num=10)#np.arange(0.000001, 0.005, 0.001) # parameter of the structural component + with open("out.log", "w") as fh: + for alpha, delta in product(alphas, deltas): + beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta) + print "\t".join(map(str, [alpha, delta, beta, roots, ll])) + fh.write("\t".join(map(str, [alpha, delta, beta, roots, ll])) + "\n") + fh.flush() - alpha = 1/10. - delta = 0.2 - beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta) - print "\t".join(map(str, [1./alpha, delta, beta, roots, ll]))
\ No newline at end of file + # alpha = 20000. + # delta = .5 + # beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta) + # print "\t".join(map(str, [1./alpha, delta, beta, roots, ll]))
\ No newline at end of file |
