Skip to content

Instantly share code, notes, and snippets.

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
View effective-scan-and-while_loop-in-tf-and-jax-solutions.ipynb
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
View effective-scan-and-while_loop-in-tf-and-jax.ipynb
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
View bayesian-time-series-analysis-with-tfp-on-jax-part-2.ipynb
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
View bayesian-time-series-analysis-with-tfp-on-jax-part-1.ipynb
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
View -pymcon-missing-value-handling.ipynb
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
View theano-jax-test-drive.ipynb
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 January 14, 2023 00:45
Fastest EM estimation for GMM in python.ipynb
View fastest-em-estimation-for-gmm-in-python.ipynb
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
View mixture_tfp.ipynb
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
View tfp_nuts_demo.ipynb
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.
View Dirichlet_random_area_plot.py
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])