From 7167a81cfb8b872dd1547e5a8669004b191417db Mon Sep 17 00:00:00 2001 From: Ben Green Date: Thu, 25 Jun 2015 23:56:26 -0400 Subject: 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. --- R Scripts/structural.R | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'R Scripts/structural.R') 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){ -- cgit v1.2.3-70-g09d2