From 16138db799c2c5c9bf84251a857943f79331caed Mon Sep 17 00:00:00 2001 From: Makan Arastuie Date: Fri, 30 Apr 2021 09:54:12 -0600 Subject: [PATCH] Minor update --- generative_model_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generative_model_utils.py b/generative_model_utils.py index 10947b6..7c0125c 100644 --- a/generative_model_utils.py +++ b/generative_model_utils.py @@ -79,8 +79,8 @@ def simulate_univariate_hawkes(mu, alpha, beta, run_time, seed=None): np.random.seed(seed) # Creating a numpy vector with 3 standard deviations from the expected number of events (99.73% of cases) - expected_num_events = max((mu * run_time) / (1 - (alpha / beta)), 5) - sd = max(int(np.sqrt((mu * run_time) / ((1 - (alpha / beta)) ** 3))), 5) + expected_num_events = max((mu * run_time) / (1 - (alpha / beta)), 4) + sd = max(int(np.sqrt((mu * run_time) / ((1 - (alpha / beta)) ** 3))), 4) num_events_upper_limit = int(expected_num_events + 3 * sd) timestamps = np.zeros(num_events_upper_limit, dtype=np.float32)