title: Scikit-learn, GroupKFold with shuffling groups?
body: <p>I was using StratifiedKFold from scikit-learn, but now I need to watch also for "groups". There is nice function GroupKFold, but my data are very time dependent. So similary as in help, ie number of week is the grouping index. But each week should be only in one fold.</p>
  
  <p>Suppose I need 10 folds. What I need is to shuffle data first, before I can used GroupKFold.</p>
  
  <p>Shuffling is in group sence - so whole groups should be shuffle among each other.</p>
  
  <p>Is there way to do is with scikit-learn elegant somehow? Seems to me GroupKFold is robust to shuffle data first.</p>
  
  <p>If there is no way to do it with scikit, can anyone write some effective code of this? I have large data sets.</p>
  
  <p>matrix, label, groups as inputs</p>