class_docstr: Data object used for all RasaModels.
  
  It contains all features needed to train the models.
  'data' is a mapping of attribute name, e.g. TEXT, INTENT, etc., and feature name,
  e.g. SENTENCE, SEQUENCE, etc., to a list of feature arrays representing the actual
  features.
  'label_key' and 'label_sub_key' point to the labels inside 'data'. For
  example, if your intent labels are stored under INTENT -> IDS, 'label_key' would
  be "INTENT" and 'label_sub_key' would be "IDS".
class_docstr_tok: ["Data","object","used","for","all","RasaModels",".","It","contains","all","features","needed","to","train","the","models",".","'data","'","is","a","mapping","of","attribute","name",",","e.g",".","TEXT",",","INTENT",",","etc.",",","and","feature","name",",","e.g",".","SENTENCE",",","SEQUENCE",",","etc.",",","to","a","list","of","feature","arrays","representing","the","actual","features",".","'label_key","'","and","'label_sub_key","'","point","to","the","labels","inside","'data","'",".","For","example",",","if","your","intent","labels","are","stored","under","INTENT","-",">","IDS",",","'label_key","'","would","be","``","INTENT","''","and","'label_sub_key","'","would","be","``","IDS","''","."]
docstr: Converts the output of sklearn's train_test_split into model data.
  
  Args:
      output_values: output values of sklearn's train_test_split
      solo_values: list of solo values
  
  Returns:
      The test and train RasaModelData
docstr_tok: ["Converts","the","output","of","sklearn","'s","train_test_split","into","model","data",".","Args",":","output_values",":","output","values","of","sklearn","'s","train_test_split","solo_values",":","list","of","solo","values","Returns",":","The","test","and","train","RasaModelData"]
code: def _convert_train_test_split(
      self, output_values: List[Any], solo_values: List[Any]
  ) -> Tuple["RasaModelData", "RasaModelData"]:
      """Converts the output of sklearn's train_test_split into model data.
  
      Args:
          output_values: output values of sklearn's train_test_split
          solo_values: list of solo values
  
      Returns:
          The test and train RasaModelData
      """
      data_train: DefaultDict[
          Text, DefaultDict[Text, List[FeatureArray]]
      ] = defaultdict(lambda: defaultdict(list))
      data_val: DefaultDict[
          Text, DefaultDict[Text, List[Any]]
      ] = defaultdict(lambda: defaultdict(list))
  
      # output_values = x_train, x_val, y_train, y_val, z_train, z_val, etc.
      # order is kept, e.g. same order as model data keys
  
      # train datasets have an even index
      index = 0
      for key, attribute_data in self.data.items():
          for sub_key, features in attribute_data.items():
              for f in features:
                  data_train[key][sub_key].append(
                      self._combine_features(
                          output_values[index * 2],
                          solo_values[index],
                          f.number_of_dimensions,
                      )
                  )
                  index += 1
  
      # val datasets have an odd index
      index = 0
      for key, attribute_data in self.data.items():
          for sub_key, features in attribute_data.items():
              for _ in features:
                  data_val[key][sub_key].append(
                      output_values[(index * 2) + 1]
                  )
                  index += 1
  
      return (
          RasaModelData(self.label_key, self.label_sub_key, data_train),
          RasaModelData(self.label_key, self.label_sub_key, data_val),
      )
  
imports: import logging
  from typing import Optional, DefaultDict, Dict, Iterable, Text, List, Tuple, Any, Union, NamedTuple, ItemsView, overload, cast
  from collections import defaultdict, OrderedDict
  import numpy
  import scipy.sparse
  from sklearn.model_selection import train_test_split
label_desc: Use image node_id 29 for calling the RasaModelData obj's underlying member method code with example usage: obj._convert_train_test_split(output_values, solo_values) and returns: RasaModelData,  RasaModelData