Skip to content

LinearRegressionModel

class LinearRegressionModel < Model

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

Usage

Run with:

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).

Details

The model is given by: The parameters are the noise variance and vector of coefficients . The data consists of observations and explanatory variables for .

Member Variables

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