diff options
| author | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-25 12:43:29 -0400 |
|---|---|---|
| committer | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-25 12:43:29 -0400 |
| commit | 708a88f3b301851c9904d8bbf0656688d9bdb95f (patch) | |
| tree | 6fde6a0dfbf0d77f23b784e7ea3eb95c516459ff /experiments/process.py | |
| parent | a04d00976c6a3e990dd1f59b4ab2507f574a6ddb (diff) | |
| download | criminal_cascades-708a88f3b301851c9904d8bbf0656688d9bdb95f.tar.gz | |
playing around with ml3
Diffstat (limited to 'experiments/process.py')
| -rw-r--r-- | experiments/process.py | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/experiments/process.py b/experiments/process.py index a9e0463..8201dea 100644 --- a/experiments/process.py +++ b/experiments/process.py @@ -14,9 +14,9 @@ if __name__ == "__main__": root_victims, victims, non_victims, age = load(open(sys.argv[1])) # alphas = np.arange(1e-3, 1e-2, 8e-4) # parameter of the time component - alphas = np.logspace(-4,-.8,num=20) + alphas = np.logspace(-3,-.1,num=10) # deltas = np.arange(0.001, 0.3, 0.008) # parameter of the structural component - deltas = np.logspace(-2,-.0001,num=20) + deltas = np.logspace(-2,-.1,num=10) with open("out.log", "w") as fh: for alpha, delta in product(alphas, deltas): beta, roots, ll = ml3(root_victims, victims, non_victims, age, alpha, delta) @@ -24,7 +24,19 @@ if __name__ == "__main__": fh.write("\t".join(map(str, [alpha, delta, beta, roots, ll])) + "\n") fh.flush() - # alpha = 0.0028 - # 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 + # # alphas = np.arange(1e-3, 1e-2, 8e-4) # parameter of the time component + # alphas = np.logspace(-4,-1.5,num=20) + # # deltas = np.arange(0.001, 0.3, 0.008) # parameter of the structural component + # deltas = np.logspace(-4,-2,num=20) + # lmbda = 1.#np.logspace(-12,-3,num=10) + # with open("out.log", "w") as fh: + # for alpha, delta in product(alphas, deltas): + # lmbda, roots, ll = ml2(root_victims, victims, non_victims, alpha, delta, lmbda) + # print "\t".join(map(str, [alpha, delta, lmbda, roots, ll])) + # fh.write("\t".join(map(str, [alpha, delta, lmbda, roots, ll])) + "\n") + # fh.flush() + + # alpha = 0.0094 + # delta = 0.0048 + # beta, roots, ll = ml2(root_victims, victims, non_victims, alpha, delta, 1.) + # print "\t".join(map(str, [alpha, delta, beta, roots, ll]))
\ No newline at end of file |
