From 1143cf60812c37957c81d39d6180921460e62901 Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 11 Jun 2015 21:27:14 -0400 Subject: started adding weights into edge probabilities --- experiments/process.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'experiments/process.py') 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} ".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() -- cgit v1.2.3-70-g09d2