class_docstr: Splitter that successively cuts test folds off the end of the series.
  
  Takes an integer ``test_size`` that defines the number of steps included in the
  test set of each fold. The train set of each fold will contain all data before
  the test set. If the data contains multiple instances, ``test_size`` is
  _per instance_.
  
  If no ``step_length`` is defined, the test sets (one for each fold) will be
  adjacent and disjoint, taken from the end of the dataset.
  
  For example, with ``test_size=7`` and ``folds=5``, the test sets in total will cover
  the last 35 steps of the data with no overlap.
  
  Parameters
  ----------
  test_size : int or float
      If int: the number of steps included in the test set of each fold.
          Formally, steps are consecutive ``iloc`` indices.
      If float: the proportion of steps included in the test set of each fold,
          as a proportion of the total number of consecutive ``iloc`` indices.
          Must be between 0.0 and 1.0. Proportions are rounded to the
          next higher integer count of samples (ceil).
          Cave: not the ``loc`` proportion between start and end locations,
          but a proportion of total number of consecutive ``iloc`` indices.
  folds : int, default = 5
      The number of folds.
  step_length : int, optional
      The number of steps advanced for each fold. Defaults to `test_size`.
  
  Examples
  --------
  >>> import numpy as np
  >>> from sktime.split import ExpandingGreedySplitter
  
  >>> ts = np.arange(10)
  >>> splitter = ExpandingGreedySplitter(test_size=3, folds=2)
  >>> list(splitter.split(ts))  # doctest: +SKIP
  [
      (array([0, 1, 2, 3]), array([4, 5, 6])),
      (array([0, 1, 2, 3, 4, 5, 6]), array([7, 8, 9]))
  ]
code: def __init__(
      self, test_size: int, folds: int = 5, step_length: int = None
  ):
      super().__init__()
      self.test_size = test_size
      self.folds = folds
      self.step_length = step_length
      self.fh = np.arange(test_size) + 1
  
      # no algorithm implemented that is faster for float than naive iteration
      if isinstance(test_size, float):
          self.set_tags(**{"split_hierarchical": False})
  
file_path: sktime/sktime/split/expandinggreedy.py
imports: import numpy
  import pandas
  from sktime.split.base import BaseSplitter
  from sktime.split.base._common import SPLIT_GENERATOR_TYPE
label_desc: Use image node_id 1 to create a new ExpandingGreedySplitter object from inherited base classes: BaseSplitter with example: obj = ExpandingGreedySplitter(test_size, folds, step_length)