title: LassoCV UnboundLocalError: local variable 'best_l1_ratio' referenced before assignment
body: <p>The same code and dataset I'm using now was working fine before I did a fresh install of Anaconda. Using <code>Lasso</code> instead of <code>LassoCV</code> seems to prevent the error. I'm not sure if this is a new/reintroduced bug or if I'm doing something stupid without realizing it. Any help is greatly appreciated.</p>
  
  <pre><code>from sklearn.feature_selection import RFECV
  from sklearn.linear_model import LassoCV
  from sklearn.model_selection import KFold
  
  cv3 = KFold(n_splits=3, random_state=42, shuffle=True)
  lasso_cv = LassoCV();
  rfecv = RFECV(estimator=lasso_cv, step=1, cv=cv3, scoring='neg_mean_squared_log_error')
  rfecv.fit(Xtrain, ytrain)
  
  
  ---------------------------------------------------------------------------
  UnboundLocalError                         Traceback (most recent call last)
  &lt;ipython-input-67-b6f72e87c656&gt; in &lt;module&gt;()
       12 lasso_cv = LassoCV();
       13 rfecv = RFECV(estimator=lasso_cv, step=1, cv=cv3, scoring='neg_mean_squared_log_error')
  ---&gt; 14 rfecv.fit(Xtrain, ytrain)
  
  ~/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/rfe.py in fit(self, X, y)
      434         scores = parallel(
      435             func(rfe, self.estimator, X, y, train, test, scorer)
  --&gt; 436             for train, test in cv.split(X, y))
      437 
      438         scores = np.sum(scores, axis=0)
  
  ~/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/rfe.py in &lt;genexpr&gt;(.0)
      434         scores = parallel(
      435             func(rfe, self.estimator, X, y, train, test, scorer)
  --&gt; 436             for train, test in cv.split(X, y))
      437 
      438         scores = np.sum(scores, axis=0)
  
  ~/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/rfe.py in _rfe_single_fit(rfe, estimator, X, y, train, test, scorer)
       29     X_test, y_test = _safe_split(estimator, X, y, test, train)
       30     return rfe._fit(
  ---&gt; 31         X_train, y_train, lambda estimator, features:
       32         _score(estimator, X_test[:, features], y_test, scorer)).scores_
       33 
  
  ~/anaconda3/lib/python3.6/site-packages/sklearn/feature_selection/rfe.py in _fit(self, X, y, step_score)
      171                 print("Fitting estimator with %d features." % np.sum(support_))
      172 
  --&gt; 173             estimator.fit(X[:, features], y)
      174 
      175             # Get coefs
  
  ~/anaconda3/lib/python3.6/site-packages/sklearn/linear_model/coordinate_descent.py in fit(self, X, y)
     1203                 best_mse = this_best_mse
     1204 
  -&gt; 1205         self.l1_ratio_ = best_l1_ratio
     1206         self.alpha_ = best_alpha
     1207         if self.alphas is None:
  
  UnboundLocalError: local variable 'best_l1_ratio' referenced before assignment
  </code></pre>
  
  <blockquote>
    <p>Darwin-16.7.0-x86_64-i386-64bit<br>
    Python 3.6.3 |Anaconda, Inc.| (default, Oct  6 2017, 12:04:38)<br>
    [GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)]<br>
    NumPy 1.13.3<br>
    SciPy 0.19.1<br>
    Scikit-Learn<br>
    0.19.1</p>
  </blockquote>