Skip to content

Instantly share code, notes, and snippets.

View upul's full-sized avatar
🎯
Focusing

Upul Bandara upul

🎯
Focusing
View GitHub Profile
@twiecki
twiecki / bayesian_neural_network.ipynb
Last active February 22, 2022 01:28
Bayesian Neural Network in PyMC3
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.
@jaanli
jaanli / black_box_vi_bayesian_linear_regression.py
Created February 11, 2017 17:32
Black box variational inference for Bayesian linear regression. Numpy and scipy only.
"""Use black-box variational inference (https://arxiv.org/abs/1401.0118) to
fit Bayesian linear regression (https://en.wikipedia.org/wiki/Bayesian_linear_regression)
and ensure it gets the analytic posterior mean from wikipedia.
"""
import numpy as np
import scipy.stats
def generate_data(cfg):
"""synthetic data: