title: How does sklearn LassoCV perform cross validation?
body: <p>I would like to know how does sklearn.LassoCV perform cross validation. In particular I would like to know how are the samples subdivided in the folds. Is it a random or deterministic process?</p>
  
  <p>For example suppose I have 100 samples and I use 10 folds cross validation and consider F the function which send every sample to its fold.</p>
  
  <p>F(1:10)=1, F(11:20)=2,...          or is it a random process ( for example F(1)=8, F(2)=7...) </p>
  
  <p>Let me know if the question is not clear.</p>
  
  <p>Thanks :)</p>
  
  <p>Ok this is the solution:</p>
  
  <pre><code>from sklearn.linear_model import LassoCV
  from sklearn.cross_validation import KFold
  
  kf=KFold(len(y),n_folds=10,shuffle=True)
  cv=LassoCV(cv=kf).fit(x,y)
  </code></pre>