Skip to content

Commit

Permalink
Minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
arastuie committed Apr 30, 2021
1 parent f3d3d2e commit 16138db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions generative_model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 16138db

Please sign in to comment.