Created
June 23, 2021 13:19
-
-
Save btseytlin/91492f111e0a4bc4bb3a9c36d06a62f4 to your computer and use it in GitHub Desktop.
Medium "How to actually forecast COVID-19" embed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
model = BarebonesSEIR() | |
model.params = model.get_fit_params() | |
train_initial_conditions = model.get_initial_conditions(train_subset) | |
train_t = np.arange(len(train_subset)) | |
(S, E, I, R, D) = model.predict(train_t, train_initial_conditions) | |
plt.figure(figsize=(10, 7)) | |
plt.plot(train_subset.date, train_subset['total_dead'], label='ground truth') | |
plt.plot(train_subset.date, D, label='predicted', color='black', linestyle='dashed' ) | |
plt.legend() | |
plt.title('Total deaths') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment