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: Initializes the RasaModelData object.
  
  Args:
      label_key: the key of a label used for balancing, etc.
      label_sub_key: the sub key of a label used for balancing, etc.
      data: the data holding the features
docstr_tok: ["Initializes","the","RasaModelData","object",".","Args",":","label_key",":","the","key","of","a","label","used","for","balancing",",","etc",".","label_sub_key",":","the","sub","key","of","a","label","used","for","balancing",",","etc",".","data",":","the","data","holding","the","features"]
code: def __init__(
      self,
      label_key: Optional[Text] = None,
      label_sub_key: Optional[Text] = None,
      data: Optional[Data] = None,
  ) -> None:
      """Initializes the RasaModelData object.
  
      Args:
          label_key: the key of a label used for balancing, etc.
          label_sub_key: the sub key of a label used for balancing, etc.
          data: the data holding the features
      """
      self.data = data or defaultdict(lambda: defaultdict(list))
      self.label_key = label_key
      self.label_sub_key = label_sub_key
      # should be updated when features are added
      self.num_examples = self.number_of_examples()
      self.sparse_feature_sizes: Dict[Text, Dict[Text, List[int]]] = {}
  
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 1 to create a new RasaModelData object  with example: obj = RasaModelData(label_key, label_sub_key, data)