This file contains 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
import numpy as np | |
import pymc3 as pm | |
import matplotlib.pyplot as plt | |
""" | |
We have a situation where we have something we want to predict (y) and many variables y might depend on (200). We have 100 observations of each variable. We choose that y depends linearly on the data, with slope beta and offset alpha. Only some of the slopes are meaningful (different from 0).Can we recover these values of alpha and beta? | |
A PyMC3 translation of the Stan code from https://betanalpha.github.io/assets/case_studies/bayes_sparse_regression.html | |
""" |