diff options
Diffstat (limited to 'experiments/process.py')
| -rw-r--r-- | experiments/process.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/experiments/process.py b/experiments/process.py index 5c4c215..98406d6 100644 --- a/experiments/process.py +++ b/experiments/process.py @@ -11,11 +11,11 @@ if __name__ == "__main__": sys.exit("usage: {0} <file>".format(sys.argv[0])) root_victims, victims, non_victims, age = load(open(sys.argv[1])) - alpha = 1. / np.arange(1., 1000., 100.) # parameter of the time component - delta = np.arange(0.01, 0.9, 0.1) # parameter of the structural component + alphas = 1. / np.arange(1., 4000., 50.) # parameter of the time component + deltas = np.arange(0.01, 0.3, 0.05) # parameter of the structural component with open("out.log", "w") as fh: - for a, d in product(alpha, delta): - beta, roots, ll = ml(root_victims, victims, non_victims, age, a, d) - print "\t".join(map(str, [a, d, beta, roots, ll, exp(ll)])) - fh.write("\t".join(map(str, [a, d, beta, roots, ll])) + "\n") + 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, exp(ll)])) + fh.write("\t".join(map(str, [alpha, delta, beta, roots, ll])) + "\n") fh.flush() |
