summaryrefslogtreecommitdiffstats
path: root/experiments/process.py
diff options
context:
space:
mode:
authorBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-20 12:11:47 -0400
committerBen Green <ben@SEASITs-MacBook-Pro.local>2015-06-20 12:11:47 -0400
commitaaa2f530675f9f76bcd48e9641354f7a0e043012 (patch)
tree1da776ef59414233b80bc4e6afbc56bfd1e33dde /experiments/process.py
parentf2891c93b96388442d44512e6c43b092153f8c25 (diff)
downloadcriminal_cascades-aaa2f530675f9f76bcd48e9641354f7a0e043012.tar.gz
added new model, ml2, which assumes all victims are infected by someone
else (unless they are root victims)
Diffstat (limited to 'experiments/process.py')
-rw-r--r--experiments/process.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/experiments/process.py b/experiments/process.py
index ff722c8..d01b3fd 100644
--- a/experiments/process.py
+++ b/experiments/process.py
@@ -1,5 +1,6 @@
import sys
from ml import ml
+from ml2 import ml2
import numpy as np
from cPickle import load
from itertools import product
@@ -11,10 +12,10 @@ if __name__ == "__main__":
sys.exit("usage: {0} <file>".format(sys.argv[0]))
root_victims, victims, non_victims, age = load(open(sys.argv[1]))
- # alphas = 1. / np.arange(1., 2000., 30.) # parameter of the time component
- alphas = np.logspace(-3,-.1,num=50)
+ alphas = np.arange(10., 30., 3.) # parameter of the time component
+ # alphas = np.logspace(0,2,num=10)
# deltas = np.arange(0.005, 0.5, 0.005) # parameter of the structural component
- deltas = np.logspace(-3,-.5,num=50)
+ deltas = np.logspace(-4,-2,num=5)
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)
@@ -24,5 +25,5 @@ if __name__ == "__main__":
# alpha = 1/10.
# delta = .5
- # beta, roots, ll = ml(root_victims, victims, non_victims, age, alpha, delta)
+ # 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