Skip to content

Instantly share code, notes, and snippets.

View aseyboldt's full-sized avatar

Adrian Seyboldt aseyboldt

View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
from functools import partial
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
@partial(np.vectorize, otypes=["float64"] * 2)
def mm_stds(rng, n_draws, alpha, beta, k=500):
draws = np.log(rng.gamma(shape=beta, scale=alpha, size=(k, n_draws)))
grad = beta - np.exp(draws) / alpha
draws_var = draws.var(-1)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aseyboldt
aseyboldt / covid.ipynb
Created June 23, 2022 15:38
Draft of covid model using gp
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.