class_docstr: Use a rolling forecast to perform cross validation
  
  Sometimes called “evaluation on a rolling forecasting origin” [1], this
  approach to CV incrementally grows the training size while using a single
  future sample as a test sample, e.g.:
  
  With h == 1::
  
      array([15136., 16733., 20016., 17708., 18019., 19227., 22893., 23739.])
      1st: ~~~~ tr ~~~~ tr ~~~~ te
      2nd: ~~~~ tr ~~~~ tr ~~~~ tr ~~~~ te
      3rd: ~~~~ tr ~~~~ tr ~~~~ tr ~~~~ tr ~~~~ te
  
  With h == 2::
  
      array([15136., 16733., 20016., 17708., 18019., 19227., 22893., 23739.])
      1st: ~~~~ tr ~~~~ tr ~~~~ te ~~~~ te
      2nd: ~~~~ tr ~~~~ tr ~~~~ tr ~~~~ te ~~~~ te
      3rd: ~~~~ tr ~~~~ tr ~~~~ tr ~~~~ tr ~~~~ te ~~~~ te
  
  Parameters
  ----------
  h : int, optional (default=1)
      The forecasting horizon, or the number of steps into the future after
      the last training sample for the test set.
  
  step : int, optional (default=1)
      The size of step taken to increase the training sample size.
  
  initial : int, optional (default=None)
      The initial training size. If None, will use 1 // 3 the length of the
      time series.
  
  Examples
  --------
  With a step size of one and a forecasting horizon of one, the training size
  will grow by 1 for each step, and the test index will be 1 + the last
  training index:
  
  >>> import pmdarima as pm
  >>> from pmdarima.model_selection import RollingForecastCV
  >>> wineind = pm.datasets.load_wineind()
  >>> cv = RollingForecastCV()
  >>> cv_generator = cv.split(wineind)
  >>> next(cv_generator)
  (array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
          17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
          34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
          51, 52, 53, 54, 55, 56, 57]), array([58]))
  >>> next(cv_generator)
  (array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
          17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
          34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
          51, 52, 53, 54, 55, 56, 57, 58]), array([59]))
  
  With a step size of 2 and a forecasting horizon of 4, the training size
  will grow by 2 for each step, and the test index will 4 + the last index
  in the training fold:
  
  >>> cv = RollingForecastCV(step=2, h=4)
  >>> cv_generator = cv.split(wineind)
  >>> next(cv_generator)
  (array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
         17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
         34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
         51, 52, 53, 54, 55, 56, 57]), array([58, 59, 60, 61]))
  >>> next(cv_generator)
  (array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
         17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33,
         34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
         51, 52, 53, 54, 55, 56, 57, 58, 59]), array([60, 61, 62, 63]))
  
  See Also
  --------
  SlidingWindowForecastCV
  
  References
  ----------
  .. [1] https://robjhyndman.com/hyndsight/tscv/
class_docstr_tok: ["Use","a","rolling","forecast","to","perform","cross","validation","Sometimes","called","\u201c","evaluation","on","a","rolling","forecasting","origin","\u201d","[","1","]",",","this","approach","to","CV","incrementally","grows","the","training","size","while","using","a","single","future","sample","as","a","test","sample",",","e.g",".",":","With","h","==","1",":",":","array","(","[","15136.",",","16733.",",","20016.",",","17708.",",","18019.",",","19227.",",","22893.",",","23739",".","]",")","1st",":","~~~~","tr","~~~~","tr","~~~~","te","2nd",":","~~~~","tr","~~~~","tr","~~~~","tr","~~~~","te","3rd",":","~~~~","tr","~~~~","tr","~~~~","tr","~~~~","tr","~~~~","te","With","h","==","2",":",":","array","(","[","15136.",",","16733.",",","20016.",",","17708.",",","18019.",",","19227.",",","22893.",",","23739",".","]",")","1st",":","~~~~","tr","~~~~","tr","~~~~","te","~~~~","te","2nd",":","~~~~","tr","~~~~","tr","~~~~","tr","~~~~","te","~~~~","te","3rd",":","~~~~","tr","~~~~","tr","~~~~","tr","~~~~","tr","~~~~","te","~~~~","te","Parameters","--","--","--","--","--","h",":","int",",","optional","(","default=1",")","The","forecasting","horizon",",","or","the","number","of","steps","into","the","future","after","the","last","training","sample","for","the","test","set",".","step",":","int",",","optional","(","default=1",")","The","size","of","step","taken","to","increase","the","training","sample","size",".","initial",":","int",",","optional","(","default=None",")","The","initial","training","size",".","If","None",",","will","use","1","\/\/","3","the","length","of","the","time","series",".","Examples","--","--","--","--","With","a","step","size","of","one","and","a","forecasting","horizon","of","one",",","the","training","size","will","grow","by","1","for","each","step",",","and","the","test","index","will","be","1","+","the","last","training","index",":",">",">",">","import","pmdarima","as","pm",">",">",">","from","pmdarima.model_selection","import","RollingForecastCV",">",">",">","wineind","=","pm.datasets.load_wineind","(",")",">",">",">","cv","=","RollingForecastCV","(",")",">",">",">","cv_generator","=","cv.split","(","wineind",")",">",">",">","next","(","cv_generator",")","(","array","(","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",",","8",",","9",",","10",",","11",",","12",",","13",",","14",",","15",",","16",",","17",",","18",",","19",",","20",",","21",",","22",",","23",",","24",",","25",",","26",",","27",",","28",",","29",",","30",",","31",",","32",",","33",",","34",",","35",",","36",",","37",",","38",",","39",",","40",",","41",",","42",",","43",",","44",",","45",",","46",",","47",",","48",",","49",",","50",",","51",",","52",",","53",",","54",",","55",",","56",",","57","]",")",",","array","(","[","58","]",")",")",">",">",">","next","(","cv_generator",")","(","array","(","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",",","8",",","9",",","10",",","11",",","12",",","13",",","14",",","15",",","16",",","17",",","18",",","19",",","20",",","21",",","22",",","23",",","24",",","25",",","26",",","27",",","28",",","29",",","30",",","31",",","32",",","33",",","34",",","35",",","36",",","37",",","38",",","39",",","40",",","41",",","42",",","43",",","44",",","45",",","46",",","47",",","48",",","49",",","50",",","51",",","52",",","53",",","54",",","55",",","56",",","57",",","58","]",")",",","array","(","[","59","]",")",")","With","a","step","size","of","2","and","a","forecasting","horizon","of","4",",","the","training","size","will","grow","by","2","for","each","step",",","and","the","test","index","will","4","+","the","last","index","in","the","training","fold",":",">",">",">","cv","=","RollingForecastCV","(","step=2",",","h=4",")",">",">",">","cv_generator","=","cv.split","(","wineind",")",">",">",">","next","(","cv_generator",")","(","array","(","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",",","8",",","9",",","10",",","11",",","12",",","13",",","14",",","15",",","16",",","17",",","18",",","19",",","20",",","21",",","22",",","23",",","24",",","25",",","26",",","27",",","28",",","29",",","30",",","31",",","32",",","33",",","34",",","35",",","36",",","37",",","38",",","39",",","40",",","41",",","42",",","43",",","44",",","45",",","46",",","47",",","48",",","49",",","50",",","51",",","52",",","53",",","54",",","55",",","56",",","57","]",")",",","array","(","[","58",",","59",",","60",",","61","]",")",")",">",">",">","next","(","cv_generator",")","(","array","(","[","0",",","1",",","2",",","3",",","4",",","5",",","6",",","7",",","8",",","9",",","10",",","11",",","12",",","13",",","14",",","15",",","16",",","17",",","18",",","19",",","20",",","21",",","22",",","23",",","24",",","25",",","26",",","27",",","28",",","29",",","30",",","31",",","32",",","33",",","34",",","35",",","36",",","37",",","38",",","39",",","40",",","41",",","42",",","43",",","44",",","45",",","46",",","47",",","48",",","49",",","50",",","51",",","52",",","53",",","54",",","55",",","56",",","57",",","58",",","59","]",")",",","array","(","[","60",",","61",",","62",",","63","]",")",")","See","Also","--","--","--","--","SlidingWindowForecastCV","References","--","--","--","--","--","..","[","1","]","https",":","\/\/robjhyndman.com\/hyndsight\/tscv\/"]
code: def __init__(self, h=1, step=1, initial=None):
      super().__init__(h, step)
      self.initial = initial
  
imports: import abc
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.utils.validation import indexable
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 1 to create a new RollingForecastCV object from inherited base classes: BaseTSCrossValidator with example: obj = RollingForecastCV(h, step, initial)