diff options
| author | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-25 23:56:26 -0400 |
|---|---|---|
| committer | Ben Green <ben@SEASITs-MacBook-Pro.local> | 2015-06-25 23:56:26 -0400 |
| commit | 7167a81cfb8b872dd1547e5a8669004b191417db (patch) | |
| tree | dd160b9a7f438837118d8ca9fe83ae6c35a0d71a /R Scripts/structural.R | |
| parent | c8fc620dda6096932707566dc8f20a3e65cb26b0 (diff) | |
| download | criminal_cascades-7167a81cfb8b872dd1547e5a8669004b191417db.tar.gz | |
Worked on process to generate cascades in R, recover them in ml2, and
compare true/recovered. Results look good: ml2 finds close-to-actual
parameters and gets ~60% of the infectors right. I will check how many
recovery gets in the top 2 or 3 infectors.
Diffstat (limited to 'R Scripts/structural.R')
| -rwxr-xr-x | R Scripts/structural.R | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/R Scripts/structural.R b/R Scripts/structural.R index 132aa6c..b68711c 100755 --- a/R Scripts/structural.R +++ b/R Scripts/structural.R @@ -1,5 +1,5 @@ -# structural = function(w1,w2,w3,gamma){ -# return (plogis(w1,scale=gamma) * plogis(w2,scale=gamma) * plogis(w3,scale=gamma)) +# structural = function(delta,lmbda,w1,w2,w3){ +# return (delta/(1. + 1./(w1*lmbda) + 1./(w2*lmbda) + 1./(w3*lmbda))) # } structural = function(delta,dist){ |
