class_docstr: TimeSequence feature engineering
docstr: roll dataframe into sequence samples to be used in TimeSequencePredictor.
  roll_train: split the whole dataset apart to build (x, y).
  :param df: a dataframe which has been resampled in uniform frequency.
  :param past_seq_len: the length of the past sequence
  :param future_seq_len: the length of the future sequence
  :return: tuple (x,y)
      x: 3-d array in format (no. of samples, past sequence length, 2+feature length), in the
      last dimension, the 1st col is the time index (data type needs to be numpy datetime type
      , e.g. "datetime64"),
      the 2nd col is the target value (data type should be numeric)
      y: y is 2-d numpy array in format (no. of samples, future sequence length) if future
      sequence length > 1, or 1-d numpy array in format (no. of samples, ) if future sequence
      length = 1
docstr_tok: ["roll","dataframe","into","sequence","samples","to","be","used","in","TimeSequencePredictor",".","roll_train",":","split","the","whole","dataset","apart","to","build","(","x",",","y",")",".",":","param","df",":","a","dataframe","which","has","been","resampled","in","uniform","frequency",".",":","param","past_seq_len",":","the","length","of","the","past","sequence",":","param","future_seq_len",":","the","length","of","the","future","sequence",":","return",":","tuple","(","x",",","y",")","x",":","3-d","array","in","format","(","no",".","of","samples",",","past","sequence","length",",","2+feature","length",")",",","in","the","last","dimension",",","the","1st","col","is","the","time","index","(","data","type","needs","to","be","numpy","datetime","type",",","e.g",".","``","datetime64","''",")",",","the","2nd","col","is","the","target","value","(","data","type","should","be","numeric",")","y",":","y","is","2-d","numpy","array","in","format","(","no",".","of","samples",",","future","sequence","length",")","if","future","sequence","length",">","1",",","or","1-d","numpy","array","in","format","(","no",".","of","samples",",",")","if","future","sequence","length","=","1"]
code: def _roll_train(self, dataframe, past_seq_len, future_seq_len):
      """
      roll dataframe into sequence samples to be used in TimeSequencePredictor.
      roll_train: split the whole dataset apart to build (x, y).
      :param df: a dataframe which has been resampled in uniform frequency.
      :param past_seq_len: the length of the past sequence
      :param future_seq_len: the length of the future sequence
      :return: tuple (x,y)
          x: 3-d array in format (no. of samples, past sequence length, 2+feature length), in the
          last dimension, the 1st col is the time index (data type needs to be numpy datetime type
          , e.g. "datetime64"),
          the 2nd col is the target value (data type should be numeric)
          y: y is 2-d numpy array in format (no. of samples, future sequence length) if future
          sequence length > 1, or 1-d numpy array in format (no. of samples, ) if future sequence
          length = 1
      """
      x = dataframe[0:-future_seq_len].values
      if len(self.target_col) == 1:
          y = dataframe.iloc[past_seq_len:, 0].values
      else:
          y = dataframe.iloc[
              past_seq_len:, list(range(0, len(self.target_col)))
          ].values
      output_x, mask_x = self._roll_data(x, past_seq_len)
      output_y, mask_y = self._roll_data(y, future_seq_len)
      # assert output_x.shape[0] == output_y.shape[0],
      # "The shape of output_x and output_y doesn't match! "
      mask = (mask_x == 1) & (mask_y == 1)
      return output_x[mask], output_y[mask]
  
imports: from zoo.chronos.autots.deprecated.feature.utils import save_config
  from zoo.chronos.autots.deprecated.feature.abstract import BaseFeatureTransformer
  from zoo.chronos.utils import deprecated
  import sklearn
  from sklearn.preprocessing import StandardScaler
  import pandas
  import numpy
  import json
  from packaging import version
label_desc: Use image node_id 18 for calling the TimeSequenceFeatureTransformer obj's underlying member method code with example usage: obj._roll_train(dataframe, past_seq_len, future_seq_len) and returns: output_x,  output_y