summaryrefslogtreecommitdiffstats
path: root/experiments/process.py
diff options
context:
space:
mode:
authorBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-20 19:09:29 -0400
committerBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-20 19:09:29 -0400
commitb26412ed5a3e08e9dc32fc73c27c42be54d82aa8 (patch)
treec7813f644f68fa819263339185afcc47a4439ae8 /experiments/process.py
parenta473003961419502b66b5111374de26331bf4fc3 (diff)
downloadcriminal_cascades-b26412ed5a3e08e9dc32fc73c27c42be54d82aa8.tar.gz
altered weight_success to show dist and dt between each parent and child
Diffstat (limited to 'experiments/process.py')
-rw-r--r--experiments/process.py28
1 files changed, 14 insertions, 14 deletions
diff --git a/experiments/process.py b/experiments/process.py
index 330a49e..49fe7a0 100644
--- a/experiments/process.py
+++ b/experiments/process.py
@@ -12,18 +12,18 @@ if __name__ == "__main__":
sys.exit("usage: {0} <file>".format(sys.argv[0]))
root_victims, victims, non_victims, age = load(open(sys.argv[1]))
- # alphas = np.arange(5e-4, 3e-3, 1e-4) # parameter of the time component
- alphas = np.logspace(-5,-1,num=20)
- # deltas = np.arange(0.03, 0.1, 0.005) # parameter of the structural component
- deltas = np.logspace(-5,-1,num=20)
- with open("out.log", "w") as fh:
- for alpha, delta in product(alphas, deltas):
- beta, roots, ll = ml2(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()
+ # # alphas = np.arange(5e-4, 3e-3, 1e-4) # parameter of the time component
+ # alphas = np.logspace(-5,-1,num=20)
+ # # deltas = np.arange(0.03, 0.1, 0.005) # parameter of the structural component
+ # deltas = np.logspace(-5,-1,num=20)
+ # with open("out.log", "w") as fh:
+ # for alpha, delta in product(alphas, deltas):
+ # beta, roots, ll = ml2(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 = .5
- # beta, roots, ll = ml2(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 = 0.004
+ delta = 0.06
+ beta, roots, ll = ml2(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