Bayesian Multivarate Regression with Regularization
In the Bayesian context, regularization is performed by applying appropriate prior distribution to the regression coefficients. Some of the common priors include
where τis the global shrinkage parameter and λjis the local shrinkage parameter.
# Data preparation import pytensor.tensor as atimport arviz as azimport pandas as pdtest_scores = pd.read_csv(pm.get_data("test_scores.csv"),index_col=0)X = test_scores.dropna().astype(float)y = X.pop("score")# Standardization X -= X.mean()X /= X.std()N, D = X.shapeD0 =int(D /2)
The horseshoe prior for each regression coefficient βiis