def train_test_split(training_test_data, train_test_ratio=0.8):
  """Splits the data into a training and test set according to the provided ratio.

  Args:
    training_test_data (pandas.dataframe): dict with time series
    train_test_ratio (float): ratio of train test split

  Returns:
    tensors: predictors and classes tensors for training and respectively test set

  """
  predictors_tf = training_test_data[training_test_data.columns[2:]]
  classes_tf = training_test_data[training_test_data.columns[:2]]

  training_set_size = int(len(training_test_data) * train_test_ratio)

  train_test_dict = {'training_predictors_tf': predictors_tf[:training_set_size],
                     'training_classes_tf': classes_tf[:training_set_size],
                     'test_predictors_tf': predictors_tf[training_set_size:],
                     'test_classes_tf': classes_tf[training_set_size:]}

  return train_test_dict