Skip to content

Latest commit

 

History

History
41 lines (36 loc) · 1.61 KB

README.md

File metadata and controls

41 lines (36 loc) · 1.61 KB

Mr.AshPen

Mr.ASH Penalized Regression

This a penalized regression formulation of sparse linear regression using the adaptive shrinkage (Mr.ASH) prior. A VEB formulation of Mr.ASH is available here: mr.ash.alpha. Theory for Mr.AshPen: Link to Overleaf

Installation

For development, download this repository and install using pip:

git clone https://github.com/banskt/mr-ash-pen.git # or use the SSH link
cd mr-ash-pen
pip install -e .

Demonstration

Link to demonstration on simple examples of linear data and trend-filtering data.

How to use

Functions are not documented yet. Here is only a quick start.

from mrashpen.inference.penalized_regression import PenalizedRegression as PLR
plr = PLR(method = 'L-BFGS-B', optimize_w = True, optimize_s = True, is_prior_scaled = True, debug = False)
plr.fit()
Returns Description
plr.coef optimized regression coefficients
plr.prior optimized Mr.ASH prior mixture coefficients
plr.obj_path Value of the objective function for all iterations
plr.theta optimized parameter theta from the objective function
plr.fitobj OptimizeResult object from scipy.optimize
--- ---

Running tests

Run the unittest from the /path/to/download/mr-ash-pen directory.

python -m unittest