Skip to content

Instantly share code, notes, and snippets.

View junpenglao's full-sized avatar
🏠
Working from home

Junpeng Lao junpenglao

🏠
Working from home
View GitHub Profile
@junpenglao
junpenglao / effective-scan-and-while_loop-in-tf-and-jax-solutions.ipynb
Created June 17, 2022 05:06
Effective Scan and While_loop in TF and JAX (Solutions).ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / effective-scan-and-while_loop-in-tf-and-jax.ipynb
Created June 17, 2022 05:05
Effective Scan and While_loop in TF and JAX.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / bayesian-time-series-analysis-with-tfp-on-jax-part-2.ipynb
Created June 17, 2022 05:05
Bayesian Time Series Analysis with TFP on JAX (Part 2).ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / bayesian-time-series-analysis-with-tfp-on-jax-part-1.ipynb
Created June 17, 2022 05:05
Bayesian Time Series Analysis with TFP on JAX (Part 1).ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / -pymcon-missing-value-handling.ipynb
Created October 20, 2020 10:15
[pymcon] Missing value handling.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / theano-jax-test-drive.ipynb
Last active November 10, 2020 07:46
theano-jax test drive.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / fastest-em-estimation-for-gmm-in-python.ipynb
Last active November 1, 2023 17:39
Fastest EM estimation for GMM in python.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / mixture_tfp.ipynb
Last active October 19, 2020 13:10
mixture_tfp.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / tfp_nuts_demo.ipynb
Last active January 13, 2020 15:13
TFP_NUTS_demo.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@junpenglao
junpenglao / Dirichlet_random_area_plot.py
Created June 8, 2018 14:18
Visualization of realization of 2D dirichlet random variable with area plot that shows uncertainty.
import numpy as np
import scipy.stats as st
import matplotlib.pyplot as plt
plt.style.use('ggplot')
pmat = np.vstack([np.linspace(1, 20, 20),
np.linspace(2, 10, 20),
np.linspace(3, 5, 20)]).T
p = np.asarray([st.dirichlet.rvs(p_, 200) for p_ in pmat])