diff options
| author | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-19 01:30:40 -0400 |
|---|---|---|
| committer | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-19 01:30:40 -0400 |
| commit | 958c31ca10c4eed08da818b9e16d84ebfeb44c27 (patch) | |
| tree | 7a77a047d20be4ebb818ec1194cfd0a355f0706b /experiments/process.py | |
| parent | 5aef644d674b73d6ba34c55b6147954b1a2a2535 (diff) | |
| download | criminal_cascades-958c31ca10c4eed08da818b9e16d84ebfeb44c27.tar.gz | |
Continuing to experiment. Identifying infections vs seeds might be
impossible :/. We may want to try a model where we just assume
infections — can get parameters for the benchmark test.
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 |
