From 958c31ca10c4eed08da818b9e16d84ebfeb44c27 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Fri, 19 Jun 2015 01:30:40 -0400 Subject: 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. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- experiments/process.py | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'experiments/process.py') 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 -- cgit v1.2.3-70-g09d2