class_docstr: K-fold iterator variant for temporal splitting of time series data
  
  The time series' are divided in time with no overlap, and are balanced.
  
  By splitting the time series', the number of samples in the data set is changed and so new
  arrays for the data and target are returned by the ``split`` function in addition to the
  iterator.
  
  Parameters
  ----------
  n_splits : int > 1
      number of folds
  
  Examples
  --------
  >>> from seglearn.split import TemporalKFold
  >>> from seglearn.datasets import load_watch
  >>> data = load_watch()
  >>> splitter = TemporalKFold(n_splits=4)
  >>> X, y, cv = splitter.split(data['X'], data['y'])
class_docstr_tok: ["K-fold","iterator","variant","for","temporal","splitting","of","time","series","data","The","time","series","'","are","divided","in","time","with","no","overlap",",","and","are","balanced",".","By","splitting","the","time","series","'",",","the","number","of","samples","in","the","data","set","is","changed","and","so","new","arrays","for","the","data","and","target","are","returned","by","the","``","split","``","function","in","addition","to","the","iterator",".","Parameters","--","--","--","--","--","n_splits",":","int",">","1","number","of","folds","Examples","--","--","--","--",">",">",">","from","seglearn.split","import","TemporalKFold",">",">",">","from","seglearn.datasets","import","load_watch",">",">",">","data","=","load_watch","(",")",">",">",">","splitter","=","TemporalKFold","(","n_splits=4",")",">",">",">","X",",","y",",","cv","=","splitter.split","(","data","[","'","X","'","]",",","data","[","'","y","'","]",")"]
code: def __init__(self, n_splits=3):
      if n_splits < 2:
          raise ValueError(
              "TemporalKFold: n_splits must be >= 2 (set to %d)"
              % n_splits
          )
      self.n_splits = n_splits
  
file_path: seglearn/seglearn/split.py
imports: import numpy
  from sklearn.model_selection._split import _build_repr
  from .util import check_ts_data, get_ts_data_parts
  from .base import TS_Data
label_desc: Use image node_id 1 to create a new TemporalKFold object from inherited base classes: object with example: obj = TemporalKFold(n_splits)