# LinearRegressionModel

class LinearRegressionModel < Model

Bayesian linear regression model with conjugate normal-inverse-gamma prior.

The model is given by: The parameters are the noise variance $\sigma^2$ and vector of coefficients $\boldsymbol{\beta}$. The data consists of observations $y_n$ and explanatory variables $\mathbf{x}_n$ for $n=1,\ldots,N$.

Run the example using:

birch sample \
--model LinearRegressionModel \
--input-file input/bike_share.json \
--output-file output/bike_share.json \
--nsamples 5


The data is from the Capital Bikeshare system in Washington D.C. for the years 2011 to 2012. The aim is to use weather and holiday information to predict the total number of bike hires on any given day (Fanaee-T and Gama, 2014).

### Member Variables

Name Description
X:Real[_,_] Explanatory variables.
β:Random<Real[_]> Regression coefficients.
σ2:Random<Real> Observation variance.
y:Random<Real[_]> Observations.