class_docstr: Group time series cross-validator.
  
  Parameters
  ----------
  test_size : int
      Size of test dataset.
  train_size : int (default=None)
      Size of train dataset.
  n_splits : int (default=None)
      Number of the splits.
  gap_size : int (default=0)
      Gap size between train and test datasets.
  shift_size : int (default=1)
      Step to shift for the next fold.
  window_type : str (default="rolling")
      Type of the window. Possible values: "rolling", "expanding".
  
  Examples
  -----------
  For usage examples, please see
  https://rasbt.github.io/mlxtend/user_guide/evaluate/GroupTimeSeriesSplit/
class_docstr_tok: ["Group","time","series","cross-validator",".","Parameters","--","--","--","--","--","test_size",":","int","Size","of","test","dataset",".","train_size",":","int","(","default=None",")","Size","of","train","dataset",".","n_splits",":","int","(","default=None",")","Number","of","the","splits",".","gap_size",":","int","(","default=0",")","Gap","size","between","train","and","test","datasets",".","shift_size",":","int","(","default=1",")","Step","to","shift","for","the","next","fold",".","window_type",":","str","(","default=","''","rolling","''",")","Type","of","the","window",".","Possible","values",":","``","rolling","''",",","``","expanding","''",".","Examples","--","--","--","--","--","-","For","usage","examples",",","please","see","https",":","\/\/rasbt.github.io\/mlxtend\/user_guide\/evaluate\/GroupTimeSeriesSplit\/"]
code: def _calculate_split_params(self):
      train_size = self.train_size
      test_size = self.test_size
      n_splits = self.n_splits
      gap = self.gap_size
      shift_size = self.shift_size
      n_groups = self._n_groups
  
      not_enough_data_error = (
          "Not enough data to split number of groups ({0})"
          " for number splits ({1})"
          " with train size ({2}), test size ({3}),"
          " gap size ({4}), shift size ({5})"
      )
  
      if (train_size is None) and (n_splits is not None):
          train_size = (
              n_groups - gap - test_size - (n_splits - 1) * shift_size
          )
          self.train_size = train_size
  
          if train_size <= 0:
              raise ValueError(
                  not_enough_data_error.format(
                      n_groups,
                      n_splits,
                      train_size,
                      test_size,
                      gap,
                      shift_size,
                  )
              )
          train_start_idx = 0
      elif (n_splits is None) and (train_size is not None):
          n_splits = (
              n_groups - train_size - gap - test_size
          ) // shift_size + 1
          self.n_splits = n_splits
  
          if self.n_splits <= 0:
              raise ValueError(
                  not_enough_data_error.format(
                      n_groups,
                      n_splits,
                      train_size,
                      test_size,
                      gap,
                      shift_size,
                  )
              )
          train_start_idx = (
              n_groups
              - train_size
              - gap
              - test_size
              - (n_splits - 1) * shift_size
          )
      else:
          train_start_idx = (
              n_groups
              - train_size
              - gap
              - test_size
              - (n_splits - 1) * shift_size
          )
  
          if train_start_idx < 0:
              raise ValueError(
                  not_enough_data_error.format(
                      n_groups,
                      n_splits,
                      train_size,
                      test_size,
                      gap,
                      shift_size,
                  )
              )
  
      self._train_start_idx = train_start_idx
  
file_path: mlxtend/mlxtend/evaluate/time_series.py
imports: from itertools import accumulate, chain, groupby, islice
  import matplotlib.pyplot
  import numpy
  from matplotlib.patches import Patch
  from matplotlib.ticker import MaxNLocator
  from sklearn.utils import indexable
label_desc: Use image node_id 4 for calling the GroupTimeSeriesSplit obj's underlying member method code with example usage: obj._calculate_split_params() without return types