summaryrefslogtreecommitdiffstats
path: root/experiments/process.py
diff options
context:
space:
mode:
authorBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-18 00:24:29 -0400
committerBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-18 00:24:29 -0400
commit4ff5e31b715a62a2cc62a1a8f8beab6c4c2234d6 (patch)
tree0918b8124bc3663691bf98115e8e4995fd99c250 /experiments/process.py
parent289cc934a3e4c130563538a462e0cd32a08b0256 (diff)
downloadcriminal_cascades-4ff5e31b715a62a2cc62a1a8f8beab6c4c2234d6.tar.gz
altered spawning model and changed temporal probability on
weight_success
Diffstat (limited to 'experiments/process.py')
-rw-r--r--experiments/process.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/experiments/process.py b/experiments/process.py
index 68c3507..a432dab 100644
--- a/experiments/process.py
+++ b/experiments/process.py
@@ -9,18 +9,18 @@ from math import exp
if __name__ == "__main__":
if len(sys.argv) < 2:
sys.exit("usage: {0} <file>".format(sys.argv[0]))
-
root_victims, victims, non_victims, age = load(open(sys.argv[1]))
- alphas = 1. / np.arange(0., 1000., 100.) # parameter of the time component
- deltas = np.arange(0.01, 0.5, 0.1) # 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 = 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()
- # alpha = 100.
- # 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 = 1/10.
+ delta = 0.28
+ 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