title: Vector autoregressive model fitting with scikit-learn
body: <p>I am trying to fit vector autoregressive (VAR) models using the generalized linear model fitting methods included in scikit-learn. The linear model has the form <em>y</em> = <strong>X</strong> <em>w</em>, but the system matrix <strong>X</strong> has a very peculiar structure: it is block-diagonal, and all blocks are identical. To optimize performance and memory consumption the model can be expressed as <strong>Y</strong> = <strong>BW</strong>, where <strong>B</strong> is a block from <strong>X</strong>, and <strong>Y</strong> and <strong>W</strong> are now matrices instead of vectors.
  The classes LinearRegression, Ridge, RidgeCV, Lasso, and ElasticNet readily accept the latter model structure. However, fitting LassoCV or ElasticNetCV fails due to Y being two-dimensional.</p>
  
  <p>I found <a href="https://github.com/scikit-learn/scikit-learn/issues/2402" rel="noreferrer">https://github.com/scikit-learn/scikit-learn/issues/2402</a>
  From this discussion I assume that the behavior of LassoCV/ElasticNetCV is intended.
  Is there a way to optimize the alpha/rho parameters other than manually implementing cross-validation?</p>
  
  <p>Furthermore, Bayesian regression techniques in scikit-learn also expect <em>y</em> to be one-dimensional. Is there any way around this?</p>
  
  <p>Note: I use scikit-learn 0.14 (stable)</p>