class_docstr: K-Folds cross validation iterator:
  Provides train/test indexes to split data in train test sets
  
  Parameters
  ----------
  k: int
      number of folds
  shuffle : bool
      If true, then the index is shuffled before splitting into train and
      test indices.
  
  Notes
  -----
  All folds except for last fold have size trunc(n/k), the last fold has
  the remainder.
class_docstr_tok: ["K-Folds","cross","validation","iterator",":","Provides","train\/test","indexes","to","split","data","in","train","test","sets","Parameters","--","--","--","--","--","k",":","int","number","of","folds","shuffle",":","bool","If","true",",","then","the","index","is","shuffled","before","splitting","into","train","and","test","indices",".","Notes","--","--","-","All","folds","except","for","last","fold","have","size","trunc","(","n\/k",")",",","the","last","fold","has","the","remainder","."]
code: def __init__(self, k_folds, shuffle=False):
      self.nobs = None
      self.k_folds = k_folds
      self.shuffle = shuffle
  
file_path: statsmodels/statsmodels/gam/gam_cross_validation/cross_validators.py
imports: from abc import ABCMeta, abstractmethod
  from statsmodels.compat.python import with_metaclass
  import numpy
label_desc: Use image node_id 1 to create a new KFold object from inherited base classes: BaseCrossValidator with example: obj = KFold(k_folds, shuffle)