title: How to use TimeSeriesSplit in cv as mentioned in the documentation of scikit-learn
body: <pre><code>tss = TimeSeriesSplit(max_train_size=None, n_splits=10)
  l =[]
  neighb = [1,3,5,7,9,11,13,12,23,19,18]
  for k in neighb:
      knn = KNeighborsClassifier(n_neighbors=k, algorithm='brute')
      sc = cross_val_score(knn, X1, y1, cv=tss, scoring='accuracy')
      l.append(sc.mean())
  </code></pre>
  
  <p>Trying to use 10 fold TimeSeries Split, but in the documentation of cross_val_score, it is given that we need to pass a cross-validation generator or an iterable. How should I pass it after time series split into train and test data to cv</p>
  
  <p>TypeError<br>
   Traceback (most recent call last)
   in ()</p>
  
  <pre><code> 14 for k in neighb:
  
   15     knn = KNeighborsClassifier(n_neighbors=k, algorithm='brute')
  </code></pre>
  
  <p>---> 16     sc = cross_val_score(knn, X1, y1, cv=tss, scoring='accuracy')</p>
  
  <pre><code> 17     l.append(sc.mean())
  
   18 ~\Anaconda3\lib\site-packages\sklearn\cross_validation.py in cross_val_score(estimator, X, y, scoring, cv, n_jobs, verbose, fit_params, pre_dispatch)
  </code></pre>
  
  <p>1579                                               train, test, verbose, None,
     1580                                               fit_params)</p>
  
  <p>-> 1581                       for train, test in cv)</p>
  
  <p>1582     return np.array(scores)[:, 0]</p>
  
  <p>1583 </p>
  
  <p>TypeError: 'TimeSeriesSplit' object is not iterable</p>